24 lines
384 B
C++
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;
|
|
}
|