MCPcopy Create free account
hub / github.com/PrajaktaSathe/Java / BankSystem

Class BankSystem

Programs/bankSystem.java:88–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86
87// class created for storing attributes and methods of the bank system -
88public class BankSystem {
89 public static void main(String[] args) {
90 Scanner s = new Scanner(System.in);
91 Account obj = new Account(); // create an object of Account class
92 // Implementing menu-driven program -
93 int choice = 0;
94 System.out.println("WELCOME TO ABC BANK!");
95 do {
96 System.out.println("How can we help you today?");
97 System.out.println("1: Create account ");
98 System.out.println("2: Deposit money ");
99 System.out.println("3: Withdraw money ");
100 System.out.println("4: Check balance ");
101 System.out.println("5: Display account information ");
102 System.out.println("6: Exit");
103 choice = s.nextInt();
104 switch (choice) {
105 case 1:
106 obj.createAccount();
107 break;
108 case 2:
109 obj.depositMoney();
110 break;
111 case 3:
112 obj.withdrawMoney();
113 break;
114 case 4:
115 obj.checkBal();
116 break;
117 case 5:
118 obj.displayAcc();
119 break;
120 default:
121 if (choice != 6) {
122 System.out.println("Invalid Input!");
123 }
124 }
125 } while (choice != 6);
126 }
127}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected