-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
63 lines (51 loc) · 1.73 KB
/
Copy pathMain.java
File metadata and controls
63 lines (51 loc) · 1.73 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
package Project1;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
System.out.println("---------------------------------------------------------------");
System.out.println(" WELCOME TO ADFC BANK ");
System.out.println("---------------------------------------------------------------");
System.out.println("1. Create Savings Account\n2. Create Current Account\n3. Deposit Money\n4. Withdraw Money\n5. Check Account Details\n6. Exit");
Scanner sc=new Scanner(System.in);
Bankserver obj=new Bankserver();
int n;
do {
System.out.println("----------------------------------");
System.out.print("Enter your choice:");
n=sc.nextInt();
System.out.println("----------------------------------");
try {
switch(n)
{
case 1:obj.createSavingsAccount();
break;
case 2:obj.createCurrentAccount();
break;
case 3:
obj.depositAmount();
//
break;
case 4:
obj.withdrawAccount();
//
break;
case 5:
obj.accountDetails();
break;
case 6:
System.out.println("---------------------------------------------------------------");
System.out.println(" *** Thank you for using ADFC Bank.*** ");
System.out.println("---------------------------------------------------------------");
break;
default:
System.out.println("check! Enter your correct option.");
}
}
catch(Exception e)
{
System.out.println("\nError: "+e.getMessage()+"\n");
}
}while(n!=6);
sc.close();
}
}