savings.cpp
资源名称:c.rar [点击查看]
上传用户:puke2000
上传日期:2022-07-25
资源大小:912k
文件大小:0k
源码类别:
C#编程
开发平台:
Visual C++
- //***********************
- //** savings.cpp **
- //***********************
- #include <iostream.h>
- #include "account.h"
- #include "savings.h"
- float Savings::minbalance=500.0; //设置透支范围
- Savings::Savings(unsigned accNo, float balan)
- :Account(accNo, balan){}
- void Savings::Withdrawal(float amount)
- {
- if(balance+minbalance<amount)
- cout <<"Insufficient funds withdrawal: " <<amount <<endl;
- else
- balance-=amount;
- Display();
- }