-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathViewState.java
More file actions
78 lines (57 loc) · 2.17 KB
/
Copy pathViewState.java
File metadata and controls
78 lines (57 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// the states that the atm view can be in
public enum ViewState {
// when the program starts for the first time (when it is idle and no
// account has been entered)
WELCOME_SCREEN_PUBLIC,
// the card number is invalid
INVALID_CARD_NUMBER,
// user entered in the wrong pin
INVALID_PIN,
// user entered in the wrong pin more than the maximum amount
TRIES_EXCEEDED,
// there is no money in the user's account
NO_MONEY_IN_ACCOUNT,
// when the user inserts their card into the machine and is prompted
// to enter in their pin
WELCOME_SCREEN_CARD_AUTH,
// the screen that asks if the user wants to withdraw or deposit, given
// that they entered in the correct pin
CARD_AUTHENTICATED,
// when the user taps on withdraw
WITHDRAW_WELCOME,
// when the user clicks deposit
DEPOSIT_WELCOME,
// tells the user to put all of the money in one envelope, then
// to press ok to open up the envelope slot
DEPOSIT_ENVELOPE_CONFIRMATION,
// any error with withdrawing
WITHDRAW_ERROR,
// an error with depositing
DEPOSIT_ERROR,
// the withdraw completed successfully
WITHDRAW_SUCCESS,
// tells the user to remove their card when they dip it
// into the reader and it has been read
REMOVE_CARD,
// should only be used if none of the other cases apply
GENERAL_TRANSACTION_ABORTED,
// the withdraw was aborted
WITHDRAW_ABORTED, DEPOSIT_ABORTED,
// no money left, there is not enough money to complete the
// transaction, or there is not the proper denomination available
// to complete the transaction from the ATM's vault
NO_MONEY_TO_DISPENSE,
// something happened inside the machine that caused the bill that it was
// processing to be rejected. This is only an issue if there are not enough
// bills to complete the transaction
INTERNAL_BILL_REJECTED,
// the user has exceeded their daily withdraw limit
DAILY_WITHDRAW_EXCEEDED,
// the user is notified that a $2.50 fee will apply with
// every transaction
FEES_WILL_APPLY,
// when the atm successfully authenticates
CARD_VALID,
// the card could not be read properly
CARD_INVALID
}