#include <iostream>
#include <iomanip>

#include "./Cash.h"
#include "./DividendStock.h"
#include "./Stock.h"

using std::cout;
using std::endl;
using std::fixed;
using std::setprecision;

int main() {
  // create several investments
  Cash* cash = new Cash(1234.56);

  Stock* stock = new Stock("MSFT");
  stock->Purchase(50, 10.00);
  stock->set_share_price(9.50);

  DividendStock* dividend = new DividendStock("INTC");
  dividend->Purchase(100, 20.00);
  dividend->PayDividend(5.00);
  dividend->set_share_price(30);

  // display info about each investment
  cout << setprecision(2);
  cout << fixed;

  cout << *cash;
  cout << endl;

  cout << *stock;
  cout << endl;

  cout << *dividend;

  delete cash;
  delete stock;
  delete dividend;

  return 0;
}