Question: Account class with a statement method Make the following changes to the Chapter 1 3 Account class ( see section 1 3 . 1 3

Account class with a statement method
Make the following changes to the Chapter 13 Account class (see section 13.13).
1. Add an array (or vector) of strings to hold a sequence of transaction
descriptions for the account. For each transaction, add an appropriate string to
this array or vector.
2. Add a string member variable called accountName to the Account class to
identify the name of the account on the statement.
3. Write a member function called getStatement() that creates an account
statement (HINT: a string). The statement should include the account name
along with the descriptions of recent transactions. This method can either return
a string version of the statement to the calling program or it can print the
statement directly from the member function.
4. In the statement, account for the following types of transactions: New Account,
initial deposit, deposit, withdrawal, interest payment.
5. Add a method called clearStatement() to reset or clear the statement.

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 Programming Questions!