#include <iostream>
#include "bankaccount.h"

using namespace std;

int main() { 
  // Question: is it better to invest $100 over 10 years at 5% 
  // or to invest $100 over 20 years at 2.5% interest? 
  bankaccount jd("Jain Dough", 100.00); 
  bankaccount js("Jon Smythe", 100.00); 

  for (int years = 0; years < 10; years++){
    jd.deposit(jd.getBalance() * 0.05);
  }

  for (int years = 0; years < 20; years++){
    js.deposit(js.getBalance() * 0.025);
  }

  cout << "Jain invests $100 over 10 years at 5%." << endl; 
  cout << "After 10 years " << jd.getaccount() << 
    " has $" << jd.getBalance() << endl; 
  cout << "Jon invests $100 over 20 years at 2.5%." << endl; 
  cout << "After 20 years " << js.getaccount() << 
    " has $" << js.getBalance() << endl; 
  
  return 0;
}
