#include "SavingsAccount.hpp" #include "CheckingAccount.hpp" #include int main() { Account account(-75.00); SavingsAccount savings(100.00, 2.5); CheckingAccount checking(100.00, 1.25); cout.precision(2); double d = 50.00; double e = 20.00; cout << "Account 1 balance: " << fixed << account.getBalance() << endl; cout << "Account 2 balance: " << fixed << savings.getBalance() << endl; cout << "Account 3 balance: " << fixed << checking.getBalance() << endl; cout << "Interest on account 2: " << fixed << savings.CalculateInterest() << endl; savings.credit(d); checking.credit(d); cout << "adding cash to account 2: " << fixed << d << endl; cout << "adding cash to account 3: " << fixed << d << endl; cout << "Account 2 new balance: " << fixed << savings.getBalance() << endl; cout << "Account 3 new balance: " << fixed << checking.getBalance() << endl; savings.debit(e) << endl; //cout << "withdrawing cash" << fixed << savings.debit(40.00) << endl; cout << "deduct 20 quid: " << fixed << savings.credit(savings.CalculateInterest()) << endl; cout << "Account 2 new balance: " << fixed << savings.getBalance() << endl; return 0; }