41 lines
1.2 KiB
C++
41 lines
1.2 KiB
C++
|
|
#ifndef ACCOUNT_H_INCLUDED_
|
|
#define ACCOUNT_H_INCLUDED_
|
|
|
|
class Account
|
|
{
|
|
public:
|
|
|
|
/* ==================== LIFECYCLE ======================================= */
|
|
//Account (); /* constructor */
|
|
//Account ( const Account &other ); /* copy constructor */
|
|
Account ( double initial_balance );
|
|
~Account (); /* destructor */
|
|
|
|
/* ==================== ACCESSORS ======================================= */
|
|
|
|
// current balance of the Account
|
|
double getBalance() const;
|
|
|
|
/* ==================== MUTATORS ======================================= */
|
|
|
|
void deposit(double amount);
|
|
void withdraw(double amount);
|
|
|
|
/* ==================== OPERATORS ======================================= */
|
|
|
|
Account& operator = ( const Account &other ); /* assignment operator */
|
|
|
|
protected:
|
|
/* ==================== DATA MEMBERS ======================================= */
|
|
|
|
private:
|
|
/* ==================== DATA MEMBERS ======================================= */
|
|
|
|
double balance;
|
|
|
|
}; /* ----- end of class Account ----- */
|
|
|
|
#endif // ACCOUNT_H_INCLUDED_
|
|
|
|
// vim:set sts=2 sw=2 et:
|