Answer:
Class SavingsAccount : public BankAccount
{
double interestRate;
int interestType;
public SavingsAccount(double interestRate, string interestType)
{
this.interestRate=interestRate;
if(interestType=="Simple")
this.interestType=1;
else if(interestType=="Compound")
this.interestType=2;
}
public double getInterestRate()
{
return this.interestRate;
}
public int getInterestType()
{
return this.interestType;
}
}
Step-by-step explanation: