24 lines
403 B
C++
24 lines
403 B
C++
#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:
|