-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
39 lines (28 loc) · 961 Bytes
/
Main.java
File metadata and controls
39 lines (28 loc) · 961 Bytes
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
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
BankService service = new BankService();
Scanner scanner = new Scanner(System.in);
while (true) {
System.out.println("\n==== JAVA BANKING SYSTEM ====");
System.out.println("1. Create Customer");
System.out.println("2. Login");
System.out.println("3. Exit");
System.out.print("Choose option: ");
int choice = scanner.nextInt();
scanner.nextLine();
switch (choice) {
case 1:
service.createCustomer(scanner);
break;
case 2:
service.login(scanner);
break;
case 3:
System.exit(0);
default:
System.out.println("Invalid option.");
}
}
}
}