Question: JAVA Language* Problem 3: Bank simulation Model the classes below: 1) CheckingBankAccount A checking bank account has value, a person can withdraw, deposit money to
JAVA Language*
Problem 3: Bank simulation
Model the classes below:
1) CheckingBankAccount A checking bank account has value, a person can withdraw, deposit money to the account
2) Address This is a simple class which has all String fields to represent an address (ex. Address line 1, line2, City, State, Zip)
3) Person A person has a first and last name, address and has a CheckingBankAccount
4) Bank Bank is associated with the checking account. Bank has a String name and address. You do not need to have a CheckingBankAccount object within this class. However it is upto you to design/model this representation.
For simplicity we will assume there is only one instance of each classes described above. Ex. Bank only has 1 account, an account is only linked to 1 person and a person only has single address.
The has-a relationship here shows aggregation. Example a person has-an address - meaning you can use the Address class within the person class to represent the address for a person.
Once you have the above classes create a main method in the Bank class. Simulate a person arriving to the bank (print the persons name, and the banks name), then simulate the person opening an account with initial deposit of $1000. Simulate a deposit of $1000 and a withdrawal of $500. Every time a withdrawal or deposit happens, a receipt is printed with the name, address of the person and his/her current balance.
Create the UML diagrams of all the classes in all of your projects.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
