-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
35 lines (31 loc) · 1.02 KB
/
Copy pathMain.java
File metadata and controls
35 lines (31 loc) · 1.02 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
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
Bank bank = new Bank();
while(true){
System.out.println("---------------------");
System.out.println("1. Admin Panel");
System.out.println("2. Atm");
System.out.println("3. Exit");
System.out.println("---------------------");
System.out.println();
System.out.print("Enter your choice: ");
int choice = scanner.nextInt();
switch(choice){
case 1:
AdminPanel.start(bank);
break;
case 2:
Atm atm = new Atm(bank);
atm.start();
break;
case 3:
System.out.println("GoodBye!");
return;
default:
System.out.println("Invalid Choice!");
}
}
}
}