checking_bro.cpp
资源名称:c.rar [点击查看]
上传用户:puke2000
上传日期:2022-07-25
资源大小:912k
文件大小:1k
源码类别:

C#编程

开发平台:

Visual C++

  1. //=====================================
  2. // checking_bro.cpp
  3. //=====================================
  4. #include<iostream>
  5. #include"checking_bro.h"
  6. //-------------------------------------
  7. Checking::Checking(string acntNo, double balan)
  8.   :Account(acntNo, balan), remittance(other){}
  9. //-------------------------------------
  10. void Checking::display()const{
  11.   std::cout<<"Checking ";
  12.   Account::display();
  13. }//------------------------------------
  14. void Checking::withdrawal(double amount){
  15.   if(remittance==remitByPost)          //信汇30元手续费
  16.     amount += 30;
  17.   if(remittance==remitByCable)         //电汇60元手续费
  18.     amount += 60;
  19.   if(balance < amount)
  20.     std::cout <<"Insufficient funds withdrawal: "<<amount<<"n";
  21.   else
  22.     balance -= amount;
  23. }//------------------------------------
  24.