Kagalive

account

Sep 30th, 2020 (edited)
507
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.49 KB | None | 0 0
  1. class Account
  2. {
  3.  
  4. private:
  5.    int balance;
  6.    std::vector<Transaction> log;
  7.  
  8. public:
  9.  
  10.    Account(); //Constructor
  11.    std::vector<std::string> Report();
  12.    bool Deposit(int amount);
  13.    bool Withdraw(int amount);
  14.    int GetBalance() {return balance;}  //inline implementation
  15.  
  16.  
  17.  
  18. //--------------------
  19.  
  20. Account::Account(): balance(0){}
  21.  
  22. vector<string> Account:Report()
  23. {
  24.  
  25.    vector<string> report;
  26.  
  27.    report.push_back("Balance is " + to_string(balance);
  28.  
  29.  
  30.  
  31. }
  32.  
  33.  
  34. };
  35.  
  36.  
  37.  
  38.  
Add Comment
Please, Sign In to add comment