https://raw.githubusercontent.com/cpplint/cpplint/HEAD/cpplint.py Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
37 lines
772 B
C++
37 lines
772 B
C++
// Copyright 2025 Vincent Batts <vbatts@hashbangbash.com>
|
|
|
|
#ifndef ACCOUNT_H_
|
|
#define ACCOUNT_H_
|
|
|
|
class Account {
|
|
public:
|
|
/* ==================== LIFECYCLE */
|
|
explicit 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;
|
|
};
|
|
|
|
#endif // ACCOUNT_H_
|
|
|
|
// vim:set sts=2 sw=2 et:
|