-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBankAccountSystem.java
More file actions
41 lines (40 loc) · 1.05 KB
/
BankAccountSystem.java
File metadata and controls
41 lines (40 loc) · 1.05 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
class BankAccountSystem
{
/**
* Main
*
* @author Austin Andrews; Austin.Taylor.Andrews@gmail.com
* @param args Ignored
*/
public static void main(String[] args)
{
Startup();
}
/**
* Primary app cycle. Retrieves user input.
* Depending on input, either performs a deposit, withdrawal, or balance query.
*
* @return None. Expects that lower level service performs shutdown.
*/
private static void Startup()
{
var userInputService = new UserInputService();
var account = new Account();
while (true)
{
var command = userInputService.PromptUserForInput(PromptEnum.Menu);
switch (command)
{
case "deposit":
account.Deposit();
break;
case "withdraw":
account.Withdraw();
break;
case "balance":
account.Balance();
break;
}
}
}
}