checking.cpp
来自「这是我们C++书上的课后题答案。是钱能编著的第二版C++」· C++ 代码 · 共 25 行
CPP
25 行
#include<iostream>
#include"Checking.h"
//////////////////////////////////////////////////////////////////////////
Checking::Checking(string acntNo,double balan /* = 0.0 */)
:Account(acntNo,balan),remittance(other)
{
}
void Checking::display()const
{
std::cout<<"Checking ";
Account::display();
}
void Checking::withdrawal(double amount)
{
if(remittance == remintByPost)
amount +=30;
if(remittance == remitByCable)
amount += 60;
if(balance <amount)
std::cout<<"Insuficient funds withdrawal: "<<amount<<endl;
else
balance -= amount;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?