-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBankMain.java
More file actions
79 lines (76 loc) · 2.91 KB
/
Copy pathBankMain.java
File metadata and controls
79 lines (76 loc) · 2.91 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
79
import java.util.Scanner;
import java.io.IOException;
import java.lang.Math;
public class BankMain {
public static void menu() throws IOException{
String username = Data.generaldata.get(0);
try {
Data.customerarray(username ,0);
Data.investorarray(username ,0);
Data.card(username ,0);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
bankmenu();
}
public static void bankmenu() throws IOException{
System.out.println("--------------------");
System.out.println("Welcome, " + Data.generaldata.get(0) + "!");
System.out.println("--------------------");
System.out.println("What would you like to do?");
int choice = 0;
Scanner input = new Scanner(System.in); //asks user where to go
do{
System.out.println("1. View Savings Account");
System.out.println("2. View Checkings Account");
System.out.println("3. View Investors Account");
System.out.println("4. View Cards");
System.out.println("5. View Loans");
System.out.println("6. View Foriegn Exchange");
System.out.println("7. View Safety Deposit Box");
System.out.println("8. Sign Out");
System.out.print("Enter Your Choice: ");
choice = input.nextInt();
}
while(choice < 0 && choice > 6);
if(choice == 1){
Data.typeOfAccount = "Savings";
Account.variableupdate();
}
else if(choice == 2){
Data.typeOfAccount = "Checkings";
Account.variableupdate();
}
else if(choice == 3){
Data.typeOfAccount = "Investors";
Account.variableupdate();
}
else if(choice == 4){
Card.cardmain();
}
else if(choice == 5){
Loans.loansmenu();
}
else if(choice == 6){
ForiegnExchange.femain();
}
else if(choice == 7){
System.out.println("--------------------");
new SafetyDepositBox();
System.out.println("--------------------");
System.out.println("Your safety deposit box number is " + Data.generaldata.get(8));
System.out.println("Please visit " + BankLocations.bankname + " to access your safety deposit box.");
bankmenu();
}
else if(choice == 8){
Data.customerdata.clear(); //clears all data
Data.generaldata.clear(); //clears all data
Data.investordata.clear(); //clears all data
Data.ATMarray.clear(); //clears all data
Data.typeOfAccount = ""; //clears all data
Data.method = ""; //clears all data
UserMenu.main(null);
}
}
}