checking_bro.cpp

来自「it is a usefull thing」· C++ 代码 · 共 25 行

CPP
25
字号
//=====================================
// checking_bro.cpp
//=====================================
#include<iostream>
#include"checking_bro.h"
//-------------------------------------
Checking::Checking(string acntNo, double balan)
  :Account(acntNo, balan), remittance(other){}
//-------------------------------------
void Checking::display()const{
  std::cout<<"Checking ";
  Account::display();
}//------------------------------------
void Checking::withdrawal(double amount){
  if(remittance==remitByPost)          //信汇30元手续费
    amount += 30;
  if(remittance==remitByCable)         //电汇60元手续费
    amount += 60;
  if(balance < amount)
    std::cout <<"Insufficient funds withdrawal: "<<amount<<"\n";
  else
    balance -= amount;
}//------------------------------------

 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?