1  #include <vector>
  2  
  3  using namespace std;
  4  
  5  #include "bundle.h"
  6  #include "invoice.h"
  7  #include "productitem.h"
  8  #include "simpleinvoiceprinter.h"
  9  
 10  int main()
 11  {
 12     Invoice sample_invoice;
 13     vector<int> widths;
 14     widths.push_back(30);
 15     widths.push_back(12);
 16     widths.push_back(4);
 17     widths.push_back(12);
 18     SimpleInvoicePrinter printer(widths);
 19     sample_invoice.add(new ProductItem(Product("Toaster", 29.99), 3));
 20     Bundle* combo = new Bundle();
 21     combo->add(new ProductItem(Product("Hammer", 19.95), 1));
 22     combo->add(new ProductItem(Product("Nails", 0.01), 100));
 23     sample_invoice.add(combo);
 24  
 25     sample_invoice.print(printer);
 26     return 0;
 27  }