/* This file includes the implementation of the BankAccount class. */

#include "bankaccount.hh"

/* note: we don't actually need 'using namespace std'
 * here because nothing we use is in std.
 */
// using namespace std;

BankAccount::BankAccount() {
    balance = 0;
}

BankAccount::BankAccount(double initialAmount) {
    balance = initialAmount;
}

void BankAccount::deposit(double amount) {
    if (amount > 0) {
        balance += amount;
    }
}

void BankAccount::withdraw(double amount) {
    if (amount <= balance) {
        balance -= amount;
    }
}

double BankAccount::getBalance() {
    return balance;
}
