account.h
资源名称:c.rar [点击查看]
上传用户:puke2000
上传日期:2022-07-25
资源大小:912k
文件大小:1k
源码类别:
C#编程
开发平台:
Visual C++
- //=====================================
- // account.h
- //=====================================
- #ifndef HEADER_ACCOUNT
- #define HEADER_ACCOUNT
- //-------------------------------------
- #include<string>
- using std::string;
- //-------------------------------------
- class Account{
- protected:
- string acntNumber;
- double balance;
- public:
- Account(string acntNo, double balan=0.0);
- virtual void display()const;
- double getBalan()const{ return balance; }
- void deposit(double amount){ balance += amount; }
- bool operator==(const Account& a){ return acntNumber==a.acntNumber; }
- virtual void withdrawal(double amount){ return; }
- };//-----------------------------------
- #endif // HEADER_ACCOUNT