}
// testSavingAccount.cpp
#include"SavingAccount。h”
double SavingAccount::annualInterestRate=0.00;
int main()
{
double a, b;
SavingAccount saver1(2000。00);
saver1。modifyInterestRate(0.03);
a = saver1。calculateMonthlyInterest();
saver1。show();
SavingAccount saver2(3000.00);
saver2.modifyInterestRate(0。03);
b = saver2。calculateMonthlyInterest();
saver2。show();
SavingAccount saver11(a);
saver11.modifyInterestRate(0.04);
saver11。calculateMonthlyInterest();
saver11。show();
SavingAccount saver22(b);
saver22。modifyInterestRate(0。04);
saver22。calculateMonthlyInterest();
评论0
最新资源