1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
list<Insurance *> sales_list; // List of all sales made by any employee
vector<Employee *> employee_list; // List of all existing employees
Employee *m = new Manager("Bob", "Smith", 62000);
Employee *s1 = new Manager("Rick", "Smith", 45000);
Employee *s2 = new Manager("Dick", "Smith", 25000);
Insurance *a = new Auto("John", "Smith", "ford", "mustang", 123456789, 600, 796);
Insurance *b = new Home("Larry", "Smith", 45, 670, 3220, 4120);
e->addSalesperson(s1);
e->addSalesperson(s2);
s1->addSale(a);
s2->addSale(b);
employee_list.push_back(e);
employee_list.push_back(s1);
employee_list.push_back(s2);
sales_list.push_back(a);
sales_list.push_back(b);
e->print_staff_sales(cout);
|