Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a banking program in c + + that simulates the operation of your local bank. You should declare the following collection of classes. Class
Write a banking program in c that simulates the operation of your local bank. You should declare the following collection of classes.
Class Account
Data fields: customer type Customer balance, accountnumber, transactions array type transaction
Member functions: createAccount getaccountnumber getbalance getcustomer tostring setcustomer setbalance
Class SavingsAccount extends Account
Member functions: deposit withdraw addinterest
Class CheckingAccount extends Account
Member functions: deposit withdraw addinterest
Class Customer
Data fields: name, address, age, telephonenumber, customernumber
Member functions: Accessors and modifiers for data fields
Classes Senior, Adult, Student, all of which extend class Customer
Each has constant data fields, SAVINGSINTEREST, CHECKINTEREST, CHECKCHARGE, and OVERDRAFTPENALTY, that define these values for customers of that type.
Class Bank
Data field: array accounts type Account
Member functions: addaccount makedeposit makewithdrawal getaccount
Class Transaction
Data fields: transactiontype, amount, balance, type Date
Member functions: tostring
You need to write all these classes and an application class that interacts with the user. In the application, you should first open several accounts and then enter several transactions. A sample console output is attached.
Select:
: Add Account
: Make Deposit
: Make Withdrawal
: Check Account
: Exit
Enter Customer Name John
Enter Customer Address Regina
Enter Customer Age
Enter Customer Phone Number
Select:
: Senior
: Adult
: Student
Select:
: Checking
: Savings
Account: Added
Select:
: Add Account
: Make Deposit
: Make Withdrawal
: Check Account
: Exit
Enter Account Number
Enter The Amount
Enter the date yyyymmdd
Deposit in amount: $ on new balance: $
Select:
: Add Account
: Make Deposit
: Make Withdrawal
: Check Account
: Exit
Enter Account Number
Account:
Owner: John
Type of customer: Adult
Balance: $
DEP $ $
Select:
: Add Account
: Make Deposit
: Make Withdrawal
: Check Account
: Exit
Enter Account Number
Enter The Amount
Enter the date yyyymmdd
Withdraw from amount: on new balance:
Select:
: Add Account
: Make Deposit
: Make Withdrawal
: Check Account
: Exit
Enter Account Number
Account:
Owner: John
Type of customer: Adult
Balance: $
DEP $ $
INT CR $ $
WD $ $
Select:
: Add Account
: Make Deposit
: Make Withdrawal
: Check Account
: Exit
Enter Customer Name Sara
Enter Customer Address Regina ave
Enter Customer Age
Enter Customer Phone Number
Select:
: Senior
: Adult
: Student
Select:
: Checking
: Savings
Account: Added
Select:
: Add Account
: Make Deposit
: Make Withdrawal
: Check Account
: Exit
Enter Account Number
Enter The Amount
Enter the date yyyymmdd
Deposit in amount: $ on new balance: $
Select:
: Add Account
: Make Deposit
: Make Withdrawal
: Check Account
: Exit
Enter Account Number
Account:
Owner: Sara
Type of customer: Student
Balance: $
DEP $ $
Select:
: Add Account
: Make Deposit
: Make Withdrawal
: Check Account
: Exit
Enter Account Number
Enter The Amount
Enter the date yyyymmdd
Withdraw from amount: on new balance:
Select:
: Add Account
: Make Deposit
: Make Withdrawal
: Check Account
: Exit
Enter Account Number
Account:
Owner: Sara
Type of customer: Student
Balance: $
DEP $ $
INT CR $ $
WD $ $
CHKCHG $ $
Select:
: Add Account
: Make Deposit
: Make Withdrawal
: Check Account
: Exit
if possible pls provide me a single program with everything and also consider below
const double Student::SAVINGSINTEREST ; annual rate
const double Student::CHECKINGINTEREST ; annual rate. Yes! this is interest rate for the checking account.
const double Student::CHECKCHARGE ; cents for withdrawal
const double Student::OVERDRAFTPENALTY ; dollar
const double Senior::SAVINGSINTEREST ; annual rate
const double Senior::CHECKINGINTEREST ; annual rate. Yes! this is interest rate for the checking account.
const double Senior::CHECKCHARGE
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