checking.cpp
资源名称:c.rar [点击查看]
上传用户:puke2000
上传日期:2022-07-25
资源大小:912k
文件大小:1k
源码类别:
C#编程
开发平台:
Visual C++
- //=====================================
- // checking.cpp
- //=====================================
- #include<iostream>
- #include"checking.h"
- //-------------------------------------
- Checking::Checking(string acntNo, double balan)
- :acntNumber(acntNo), balance(balan), remittance(other){}
- //-------------------------------------
- void Checking::display()const{
- std::cout<<"Checking Account:"+acntNumber+" = "<<balance<<"n";
- }//------------------------------------
- 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;
- }//------------------------------------