Question
DESCRIPTION Create BankAccount class and test it. You will enhance the BankAccount class in the future labs. Submit in Repl Include test runs/ output as
DESCRIPTION
Create BankAccount class and test it. You will enhance the BankAccount class in the future labs.
Submit in Repl
Include test runs/ output as comment /* */ below all function definitions at the very bottom of the file with main()
Thoroughly test your program. Your grade partially depends on the quality of your test data.
Specifications/Requirements
BankAccount class manages only one bank account
members
first and last names (separate, default "N/A")
bank account number ( 7 digits, default "0000000")
available balance (default 0) - an amount that can be used right now
present balance (default 0)- amount recorded in the account, including funds not yet available
mutator function setAccount() to set all member variables
accessor function to return a bank account object as a string ( to_String()), for example, " Mary Lee 1000099 87.65 300.00"
main()
a menu with the following options
print all bank records as a well-formatted table with headings, including pending amount; if the pending amount is zero, print "-"; for example,
First Name Last Name Account Number Available Balance Present Balance Pending Amount
Mary Lee 1000099 87.65 300.00 212.35
John Smith 1001239 1887.30 1887.30 -
exit
input file
No validation is needed; assume all records are valid
The file does not have a header row
The number of records in the input file is unknown
Record structure (in that order)
First_Name Last_Name Account_Number Available_Balance Present_Balance
Mary Lee 1000099 87.65 300.00
EXAMPLES
toString()
to format the string use stringstream #include
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