tmp.c/account.h
Vincent Batts c89b8f22da
account: implement deposit, withdraw, and getter
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2025-02-08 11:18:25 -05:00

41 lines
1.2 KiB
C++

/*
* =====================================================================================
* Class: Account
* Description:
* =====================================================================================
*/
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 ----- */