Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Make a class BankManager to test the classes Transaction , BankAccount , and Bank . In the main method, do the following: Initialize the static

Make a classBankManagerto test the classesTransaction,BankAccount, andBank. In the main method, do the following:

  1. Initialize the static data membermonthlyFee, from classBank, to20.0.
  2. What is an instance of the classBanknamedmyBankusing the constructor with
  3. two parameters and pass the following two arguments: "LEHIGH UNIVERSITY
  4. BANK" and "Bethlehem".
  5. Make aBankAccountobject for each of the following five bank account names
  6. and balances and add them tomyBankusing methodaddBankAccount().
"John Blake" "Sarah Brown" "Emma Johnson" "Suzan Jones" "Mary Chen" $1,200 $2,045 $450 $23,000 $550 

4. Display a main menu with 4 operations for the user to select from:

a.Manage Existing Account: Prompt the user to enter an account number that

is formed of 6 digits and display an error message if the account number is invalid (not 6 digits). Find the account inmyBanklist of accounts. If the account number is not valid or is not found, display a message and prompt the user to enter another operation. If the account number is found, display the following sub menu of operations for the user to select from repeatedly until operation 5 is selected.

1:View Balance- Display the balance of the account.

2:Deposit- Prompt the user for the amount to deposit and a description of the deposit, call methoddeposit()to add the amount to the account balance and display the new balance of the account.

4

CSE17

Lehigh University Fall 2020

3:Withdraw- Prompt the user for the amount to withdraw and a description of the withdrawal and call methodwithdraw(). If the withdrawal is completed successfully (withdraw()returned true), display the new balance, otherwise print an error message.

4:View Statement:- Display complete information of the bank account (owner, account, balance, and list of transactions)

5:Exit Manage Account: the program returns to the bank main menu.

  1. Add New Account:Prompt the user to enter an owner name and a balance and make an instance of classBankAccount. Add the created instance tomyBankusing methodaddBankAccount().
  2. Remove Existing Account:Prompt the user to enter an account number that is formed of 6 digits. Find the account in myBank list of accounts. If no bank account is found or the bank account is invalid, display an error message. If the account is found, remove it by calling methodremoveAccount().
  3. Apply Monthly Fee: Deduct the monthly fee from all the bank accounts using methodwithdrawwith description "Monthly fee".
  4. View All Accounts: displays the information of all the bank accounts (name, account, and balance only).
  5. Exit:displays a thank you message and quits the program

Test your program for the different operations using the sample run given below.

Document your code and submit the filesTransaction.java,BankAccount.java,Bank.java, andBankManager.javaon courseSite. Submit the UML diagram of the classesTransaction,BankAccount, andBankand show the relationships between them.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions

Question

How would different prices affect the sales of the product?

Answered: 1 week ago