tmp.c/account.cpp
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

24 lines
384 B
C++

#include <iostream>
using namespace std;
#include "account.h"
Account::Account ( double initial_balance ) : balance(initial_balance) {
}
Account::~Account () {
cout << "account deleted" << endl;
}
double Account::getBalance() const {
return balance;
}
void Account::deposit(double amount) {
balance += amount;
}
void Account::withdraw(double amount) {
balance -= amount;
}