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

C#编程

开发平台:

Visual C++

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