Question: C++ Use abstract classes and pure virtual functions to design classes to manipulate savings account, Suppose that the bank offers two types of savings accounts:
C++ Use abstract classes and pure virtual functions to design classes to manipulate savings account, Suppose that the bank offers two types of savings accounts: one that has no minimum balance and a lower interest rate and another that requires a minimum balance and has a higher interest rate.
this is what i have so far:
//savingsAccount.h
//2 classes needed
Class SavingsAccount: public Account
{
Public :
SavingsAccount(string, string, double,);
Double getInterestRate() const;
Private :
Double interestRate
};
//2nd file
Class MimimunBalanceSavingsAccount: public SavingsAccount
{
Public: minimumBalanceSavingsAccount(string, string, double);
Private:
doubleminimumBalance;
};
MinimumBalanceSavingsAccount::MinimumBalanceSavings (string owner, string accNum,double balance):
{
interestRate=0.02
}
//savingsAccount.cpp
SavingsAccount::SavingsAccount(string owner,string accountnumber, doublebalance)
{
//assighndatamembers
interestRate=0.01
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
