Hey guys. I need to make a program with classes that a person would normally use for a bank account. I have the savings and checking account working (as can be seen below) but I also need to add a child class which will work as a CD (certificate of deposit) account. Basically, the class will put out a warning message if the money is withdrawn before a certain amount of time, and assess a percentage penalty (say, 10%) to the withdrawal. If someone could give me a hint/nudge in the right direction with this project, it would be greatly appreciated.
//Possible CD header
// Create a CD account (1 yr) as a child of the account class,
//(which will have a higher interest rate than the savings account) and
//will give the user a $ penalty for withdrawing money before a certain time period is
//finished
//*No money can be deposited
#ifndef CD_H
#define CD_H
class CertificateOfDeposit:public Account
{
public:
CertificateOfDeposit (double, double, double);
void penalty(double);
double calculateInterest()const;
void print();
private:
double fee;
double rate;
//double time;
};
#endif