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

C#编程

开发平台:

Visual C++

  1. //=====================================
  2. // checking.cpp
  3. //=====================================
  4. #include<iostream>
  5. #include"checking.h"
  6. //-------------------------------------
  7. Checking::Checking(string acntNo, double balan)
  8.   :acntNumber(acntNo), balance(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.   if(remittance==remitByCable)         //电汇加收60元手续费
  17.     amount += 60;
  18.   if(balance < amount)
  19.     std::cout<<"Insufficient funds withdrawal: "<<amount<<"n";
  20.   else
  21.     balance -= amount;
  22. }//------------------------------------
  23.