第7章 C++继承与派生.ppt

* * * ********2011/11/23 * * * * * * * * * * * * * * * * * * * * * void CreditAccount::settle(const Date date) { double interest = acc.getSum(date) * rate; if (interest != 0) record(date, interest, interest); if (date.getMonth() == 1) record(date, -fee, annual fee); acc.reset(date, getDebt()); } void CreditAccount::show() const { Account::show(); cout \tAvailable credit: getAvailableCredit(); } ? //7_10.cpp #include account.h #include iostream using namespace std; * int main() { Date date(2008, 11, 1); //起始日期 //建立几个账户 SavingsAccount sa1(date, S3755217, 0.015); SavingsAccount sa2(

文档评论(0)

1亿VIP精品文档

相关文档