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

C#编程

开发平台:

Visual C++

  1. //=====================================
  2. // savings_bro.cpp
  3. //=====================================
  4. #include<iostream>
  5. #include"savings_bro.h"
  6. //-------------------------------------
  7. double Savings::minBalance = 0;
  8. //-------------------------------------
  9. void Savings::display()const{
  10.   std::cout<<"Savings ";
  11.   Account::display();
  12. }//------------------------------------
  13. void Savings::withdrawal(double amount){
  14.   if(balance + minBalance < amount)
  15.     std::cout <<"Insufficient funds withdrawal: "<<amount<<"n";
  16.   else
  17.     balance -= amount;
  18. }//------------------------------------
  19.