Account.hpp 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. // ************************************************************************** //
  2. // //
  3. // Account.hpp for GlobalBanksters United //
  4. // Created on : Thu Nov 20 19:43:15 1989 //
  5. // Last update : Wed Jan 04 14:54:06 1992 //
  6. // Made by : Brad "Buddy" McLane <bm@gbu.com> //
  7. // //
  8. // ************************************************************************** //
  9. #pragma once
  10. #ifndef __ACCOUNT_H__
  11. #define __ACCOUNT_H__
  12. // ************************************************************************** //
  13. // Account Class //
  14. // ************************************************************************** //
  15. class Account {
  16. public:
  17. typedef Account t;
  18. static int getNbAccounts( void );
  19. static int getTotalAmount( void );
  20. static int getNbDeposits( void );
  21. static int getNbWithdrawals( void );
  22. static void displayAccountsInfos( void );
  23. Account( int initial_deposit );
  24. ~Account( void );
  25. void makeDeposit( int deposit );
  26. bool makeWithdrawal( int withdrawal );
  27. int checkAmount( void ) const;
  28. void displayStatus( void ) const;
  29. private:
  30. static int _nbAccounts;
  31. static int _totalAmount;
  32. static int _totalNbDeposits;
  33. static int _totalNbWithdrawals;
  34. static void _displayTimestamp( void );
  35. int _accountIndex;
  36. int _amount;
  37. int _nbDeposits;
  38. int _nbWithdrawals;
  39. Account( void );
  40. };
  41. // ************************************************************************** //
  42. // vim: set ts=4 sw=4 tw=80 noexpandtab: //
  43. // -*- indent-tabs-mode:t; -*-
  44. // -*- mode: c++-mode; -*-
  45. // -*- fill-column: 75; comment-column: 75; -*-
  46. // ************************************************************************** //
  47. #endif /* __ACCOUNT_H__ */