Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In java. I have already made the four classes. I just need help on how to simulate the bank sequence in the last paragraph Model

In java. I have already made the four classes. I just need help on how to simulate the bank sequence in the last paragraph

image text in transcribed

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 person's name, and the bank's 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

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

Beginning C# 5.0 Databases

Authors: Vidya Vrat Agarwal

2nd Edition

1430242604, 978-1430242604

More Books

Students also viewed these Databases questions