-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBankLocations.java
More file actions
120 lines (112 loc) · 6.17 KB
/
Copy pathBankLocations.java
File metadata and controls
120 lines (112 loc) · 6.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
import java.util.Scanner;
public class BankLocations{
public static String bankname = "";
public static void blmain() {
Scanner scan = new Scanner(System.in);
//Assuming that this goes after login
System.out.println("Welcome to The Bank of Vito Cangerizzi.");
System.out.println("--------------------");
System.out.println("1) The Bank of Vito Cangerizzi, 241 Central Ave, Jersey City, NJ 07307");
System.out.println("2) Vito Southern Bank of New Jersey, 1970 NJ-70 East, Cherry Hill, NJ 08003");
System.out.println("3) Vito Western Bank of New Jersey, 2465 S Broad St, Hamilton Township, NJ 08610");
System.out.println("4) Vito Eastern Bank of New Jersey, 8 S Main St, Marlboro, NJ 07746");
System.out.println("--------------------");
System.out.println("!~ Enter the number of the bank you are closest to/would like to see the details of.");
System.out.print("!~ If you do not know which bank you are closest to, type 5: ");
int locationAnswer = scan.nextInt();
boolean validLocation = false;
while (!validLocation) {
if (locationAnswer == 1) {
validLocation = true;
System.out.println("--------------------");
System.out.println("Name: The Bank of Vito Cangerizzi (Main)");
System.out.println("Area: Northern New Jersey");
System.out.println("Address: 241 Central Ave, Jersey City, NJ 07307");
System.out.println("Routing Number: 021206074");
System.out.println("--------------------");
bankname = "The Bank of Vito Cangerizzi (Main)";
} else if (locationAnswer == 2) {
validLocation = true;
System.out.println("--------------------");
System.out.println("Name: Vito Southern Bank of New Jersey");
System.out.println("Area: Southern New Jersey");
System.out.println("Address: 1970 NJ-70 East, Cherry Hill, NJ 08003");
System.out.println("Routing Number: 031302117");
System.out.println("--------------------");
bankname = "Vito Southern Bank of New Jersey";
} else if (locationAnswer == 3) {
validLocation = true;
System.out.println("--------------------");
System.out.println("Name: Vito Western Bank of New Jersey");
System.out.println("Area: Western New Jersey");
System.out.println("Address: 2465 S Broad St, Hamilton Township, NJ 08610");
System.out.println("Routing Number: 231271161");
System.out.println("--------------------");
bankname = "Vito Western Bank of New Jersey";
} else if (locationAnswer == 4) {
validLocation = true;
System.out.println("--------------------");
System.out.println("Name: Vito Eastern Bank of New Jersey");
System.out.println("Area: Eastern New Jersey");
System.out.println("Address: 8 S Main St, Marlboro, NJ 07746");
System.out.println("Routing Number: 231170181");
System.out.println("--------------------");
bankname = "Vito Eastern Bank of New Jersey";
} else if (locationAnswer == 5) {
validLocation = true;
scan.nextLine();
boolean validZip = false;
while (!validZip) {
System.out.println("--------------------");
System.out.print("Please enter the first three(3) digits of your zip code: ");
String startZip = scan.nextLine();
if (startZip.equals("070") || startZip.equals("071") || startZip.equals("072") || startZip.equals("073") || startZip.equals("074") || startZip.equals("075") || startZip.equals("076") || startZip.equals("078") || startZip.equals("079") || startZip.equals("088") || startZip.equals("089")) {
System.out.println("--------------------");
System.out.println("Name: The Bank of Vito Cangerizzi (Main)");
System.out.println("Area: Northern New Jersey");
System.out.println("Address: 241 Central Ave, Jersey City, NJ 07307");
System.out.println("Routing Number: 021206074");
System.out.println("--------------------");
validZip = true;
bankname = "The Bank of Vito Cangerizzi";
} else if (startZip.equals("077") || startZip.equals("087")) {
System.out.println("--------------------");
System.out.println("Name: Vito Southern Bank of New Jersey");
System.out.println("Area: Southern New Jersey");
System.out.println("Address: 1970 NJ-70 East, Cherry Hill, NJ 08003");
System.out.println("Routing Number: 031302117");
System.out.println("--------------------");
validZip = true;
bankname = "Vito Southern Bank of New Jersey";
} else if (startZip.equals("085") || startZip.equals("086")) {
System.out.println("--------------------");
System.out.println("Name: Vito Western Bank of New Jersey");
System.out.println("Area: Western New Jersey");
System.out.println("Address: 2465 S Broad St, Hamilton Township, NJ 08610");
System.out.println("Routing Number: 231271161");
System.out.println("--------------------");
validZip = true;
bankname = "Vito Western Bank of New Jersey";
} else if (startZip.equals("080") || startZip.equals("081") || startZip.equals("083") || startZip.equals("082") || startZip.equals("084")) {
System.out.println("--------------------");
System.out.println("Name: Vito Eastern Bank of New Jersey");
System.out.println("Area: Eastern New Jersey");
System.out.println("Address: 8 S Main St, Marlboro, NJ 07746");
System.out.println("Routing Number: 231170181");
System.out.println("--------------------");
validZip = true;
bankname = "Vito Eastern Bank of New Jersey";
} else {
System.out.println("Invalid response. Please try again:");
}
}
} else {
System.out.println("--------------------");
System.out.println("Invalid response. Please try again:");
System.out.println("Please enter the number of whichever bank you are closest to, or would like to see the details of (including addresses and routing numbers).");
System.out.print("If you do not know which bank you are closest to, type 5: ");
locationAnswer = scan.nextInt();
}
}
}
}