Question
Write a program to simulate a bank which includes the following. Include a commented header section at the top of each class file which includes
Write a program to simulate a bank which includes the following. Include a commented header section at the top of each class file which includes your name, and a brief description of the class and program.
Create the following classes: (at least 3 classes total)
Bank
Customer
Account
At a minimum include the following data fields for each class:Bank
Routing number
Customer
First name
Last name
Account (Note that the Customer class contains the Account class as one of its data members.)
Account
Account number
Balance
Minimum balance
Overdraft fee
At a minimum write the following methods for each class: Bank
(public static void main(String[] args) ; The Bank class will contain the main method.
Create new customer
Find Customer (Given an account number or customer name, retrieve the related customer and account.)
The bank must be able to contain multiple customers and multiple accounts. (This generally means the Bank class should include an array or Array List of Customer class objects.) The bank should be able to look up each customer by name and / or account number when performing transactions, such as withdrawals, deposits and balance inquiries.
Customer
OpenAccount
CloseAccount
GetAccount
Account
GetBalance
DepositFunds
WithdrawFunds
PrintAccountInfo
For added functionality, you may choose to create a base class of Account which you extend into derived classes checking and savings account classes.
In your main method within the Bank class, you may perform the bank operations using user input, or you may code the operations directly within your main method in the Bank class. For example, your program may contain a user menu with options such as withdraw, deposit, find customer, etc. Or you may simply hard code the operations directly in your main method such as create customer 1, deposit $100, withdraw $50, etc.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started