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

26 lines
462 B
C++

// Copyright 2025 Vincent Batts <vbatts@hashbangbash.com>
#include <iostream>
#include "account.h"
Account::Account ( double initial_balance ) : balance(initial_balance) {
}
Account::~Account () {
std::cout << "account deleted" << std::endl;
}
double Account::getBalance() const {
return balance;
}
void Account::deposit(double amount) {
balance += amount;
}
void Account::withdraw(double amount) {
balance -= amount;
}
// vim:set sts=2 sw=2 et: