Design bank operations using 2 classes: Customer and CheckingAccount.Let us keep things simple - Each customer will have a name and one or more checking accounts (maximum 5 accounts). No Savings or...


Design bank operations using 2 classes: Customer and CheckingAccount.

Let us keep things simple - Each customer will have a name and one or more checking accounts (maximum 5 accounts). No Savings or Loan accounts.
CheckingAccount should support deposit() and withdrawal() operations, in addition to constructor with initial amount and display the current balance.

Let us assign a customer ID for every new customer (let us start from 1000001 to give an impression that this bank already has 1 million customers!). Similarly, every checking account will have auto-generated account number as well (let us start at 5000001). Here are the input commands the program should support:





new
5
Jey Veerasamy //create
5
accounts for new customer

100
1000
500
100.50
1123.50
//initial balances for those checking accounts

new
3
John Doe //create
3
accounts for new Customer John Doe

123.12
456.45
7890.78
//initial balances for those checking accounts

deposit
5000002
150.53
//deposit
150.53
to account ID
5000002


withdraw
5000008
189.34
//withdraw money from an account

add
1
John Doe //add a new account for existing customer (based
on
name)

100.50
//starting balance for new account

add
1
1000002
//add a new account for existing customer (based
on
Customer ID)

110.45
//starting balance for new account

close
//close the program




Here are the same inputs with corresponding outputs:





new
5
Jey Veerasamy


Customer
ID:
1000001
// Customer ID for new customer

100
1000
500
100.50
1123.50


Account
ID:
5000001
//new account numbers

Account
ID:
5000002


Account
ID:
5000003


Account
ID:
5000004


Account
ID:
5000005


new
3
John Doe


Customer
ID:
1000002
// Customer ID for new customer

123.12
456.45
7890.78


Account
ID:
5000006
//new account numbers

Account
ID:
5000007


Account
ID:
5000008


deposit
5000002
150.53


New
balance:
1150.53
//new balance for the account after deposit

withdraw
5000008
189.34


New
balance:
7701.44
//new balance after withdrawal operation

add
1
John Doe


100.50


Account
ID:
5000009
//additional account(s) numbers

add
1
1000002


110.45


Account
ID:
5000010
//additional account(s) numbers

close


Apr 13, 2023
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here