Question: c + + Define a class, SavingsAccount, that stores a savings account s annual interest rate and balance. The class should have two constructors (

c++ Define a class, SavingsAccount, that stores a savings accounts annual interest
rate and balance. The class should have two constructors (default one and one with
parameters to accept initial values), mutator and accessor for each of the fields, and
functions for subtracting the amount of a withdrawal, adding the amount of a deposit, and
adding the amount of monthly interest to the balance. The monthly interest rate is the
annual interest rate divided by twelve. To add the monthly interest to the balance, multiply
the monthly interest rate by the balance, and add the result to the balance.
A specification file (.h) and an implementation file (.cpp) for the class are required. The
specification should be documented using Javadoc documentation comments for the
class and all public members. The @author @file @param and @return Javadoc tags
should be used as appropriate. The implementation file requires only a single Javadoc
documentation comment at the top of the file which includes the @author and @file tags.
In the client class, the balance of a savings account at the end of a period of time. It should
ask the user for annual interest rate, the starting balance, and the number of months that
have passed since the account was established. A loop should then iterates once for every
month, performing the following:
Ask the user for the amount deposited into the account during the month. Use the
class function to add this amount to the account balance.
Ask the user for the amount withdrawn from the account during the month. Use the
class function to subtract this amount from the account balance.
Use the class function to calculate the monthly interest.
After the last iteration, the program should display the ending balance, the total amount of
deposits, the total amount of withdrawals, and total interest earned. Please output floating-
point values in the format, 0.00.

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!