Issuu on Google+


Write the application BankSystem_YourLastName for the bank service. The application should display the following menu to allow users to do the following tasks: 1. Open new account 2. Current Balance 3. Deposit 4. Withdrawal 5. Change Interest Rate 6. Bank statement 7. Exit The users can select one task to do the service. After finishing one task, the application will display the menu again to allow users to continue to work other tasks. The application only terminates when users want to exit. For each task, the application will do the following: Open new account: -Display the message to ask users to provide the following information: account number, name, and amount of money to start the account. If the money to start the account is less than 100, display the message “The minimum amount to open a new account should be $100” -After read all information, create an account object to pass all the information to the object then display the message as follows; the example with account number = 12345, name = “Annie Hogan”, amount to start = $200 ———————————————— New Account:

Account Name = Annie Hogan Account Number = 12345 Start Balance = $200.00 ———————————————— Current Balance: read and display the current balance as the following format, for example ——————————————— Check Balance: Account Name = Bill Jones Account Number = 11111 Current Balance = $2200.00 ——————————————— Deposit: ask and read the amount of money to deposit, re-calculate the balance by adding the deposit amount to the current balance, for example: ——————————————— Deposit: Account Name = Alec Goel Account Number = 54321 Deposit = $100.00 New Balance = $1300.00 ——————————————— Withdrawal: ask and read the amount of money to withdraw. Withdrawing is denied when the balance < withdraw amount + $25. Otherwise, recalculate the balance by subtracting a withdraw amount from the balance. If withdraw is denied, print out the message: ————————————————————————————– Withdrawal: Account Name = Gary Berg Account Number = 22222 Withdraw money = $50 – Denied New Balance = $60 ————————————————————————————— If withdrawal is successful, print out the following: ———————————————— Withdrawal: Account Name = Steward Lee Account Number = 33333 Withdraw = $100.00 New Balance = $2300.00 ——————————————— Change Interest Rate: display message to ask and read the new interest rate, then set the new interest rate to the interest rate and display the change ————————————————Change Interest Rate: Account Name = Relay Clinton Account Number = 44444 New Interest Rate = .005% ———————————————

Bank statement: calculate the interest amount based on the balance by using the formula: balance * interest rate / 100, the calculate the new balance: balance = balance + interest amount and print out the account information as the following format: ——————————————— Account Name = Mary Lane Account Number = 55555 Balance = $2300.00 Interest (.05% ) = $1.15 New Balance = $2301.15 ——————————————— HOW TO DO THE LAB: -Create the class named BankAccount_yourLastName that holds accountName, accountNumber, balance, interestRate and have constructor and all the methods that support for each requested tasks. -Create the controlling class named BankSystem_yourLastName that contains the method main to hold all the interaction between the application and the users as requested above Notes: -When users select one task from 2 to 6 but the account does not exist, the application will display the message to warn users to open the new account first. To do this, before display the menu, declare an object of BankAccount and assign it to null. Anytime the users select the option from 2 to 6, check if the object of BankAccount is not null to continue because if the object of BankAccount goes through the Create- new- account task, it is created with the requested information passing to the object. Therefore, the object would not be null


Download bank system java