Question: In C++ Description Objective: practice writing and testing a class. Create BankAccount class and test it. You will enhance the BankAccount class in the future

In C++

Description

Objective: practice writing and testing a class.

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

Code Snippets

toString()

to format the string use stringstream #include // sample.... stringstream ss; ss << "|"<

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!