#include "CheckingAccount.h"
#include "SavingsAccount.h"
#include <iostream>
#include <iomanip>
using namespace std;

int main()
{
  CheckingAccount a(250.0, 200.0, 5.0);
  /* opening checking account 
       initial amount $250.00
       min. balance to avoid charge $200.00
       charge per check $5.00 */

  SavingsAccount  b(1000.0, 2.5);
  /* opening savings account
       initial amount $1000.00
       interest rate 2.5% */

  cout << fixed << showpoint << setprecision(2);

  a.withdraw(30.0);
  cout << a.getBalance() << endl;
  a.withdraw(50.0); 
  cout << a.getBalance() << endl;
  a.deposit(40.0);
  cout << a.getBalance() << endl;

  b.deposit(250.0);
  cout << b.getBalance() << endl;
  b.postInterest();
  b.withdraw(100.0);
  cout << b.getBalance() << endl;

  return 0;
}

