Question: This project is to be done in C++ Design a generic class to hold the following information about a bank account: Balance . Number of

 This project is to be done in C++ Design a genericclass to hold the following information about a bank account: Balance .

This project is to be done in C++

Design a generic class to hold the following information about a bank account: Balance . Number of deposits this month Number of withdrawals Annual interest rate The class should have the following member functions Constructor: accept arguments for balance and interest rate deposit: a virtual function that accepts an argument for the amount of the deposit withdrawal: a virtual function that accepts an argument for the amount of the withdrawal calclnt: a virtual function that updates the balance by calculating the monthly interest earned by the account, and adding this interest into the balance . Next, design a savings account class; derived from the generic account class, the savings account class should have the following members status (to represent an active or inactive account) If the balance of a savings account falls below $25, it becomes inactive. (The status member could be a flag variable.) No more withdrawals may be made until the balance is raised above $25, at which time the account becomes active again. The savings account class should have the following member functions withdraw: A function that checks to see if the account is inactive before a withdrawal is made. (No withdrawal will be allowed if the account is not active) a withdrawal is then made by calling the base class version of the function. .Deposit: a function that checks to see if the account is inactive before a deposit is made. If the account is inactive and then deposit brings the balance above $25, the account becomes active again. The deposit is then made by calling the base class version of the function

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!