tmp.c/account.h
2025-02-10 17:15:32 -05:00

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: