I am currently working on a Bank project which has 3 classes. Client, Account, and Bank class. Within the bank class I have to do a loop and switch statement to process user input. I have a basic understanding on loop and switch but am struggling with this specific one.
If anyone can help me it would be very much appreciated.
c. The main method should:
i. Declare and instantiate a new Bank object.
ii. Use a loop and switch statement to process user input with the following
- P or p: call printAccounts
- W or w:
a. prompt for the index of the account
b. prompt for amount to withdraw
c. call withdraw method of specified account
d. if false, output “Insufficient Funds! Balance is $.”
e. Use DecimalFormat to format the balance.
- D or d:
a. Prompt for the index of the account
b. Prompt for the amount to deposit
c. Call deposit method of the specified account
- Q or q:
a. Quit program.
b. Do NOT use System.exit()!