#include #include #include #include "Person.h" #include "Student.h" #include "Employee.h" #include "Developer.h" #include "Manager.h" using namespace std; int main() { Person * p1 = new Person("Fred Flintstone", 68); cout << p1->GetName() << endl; cout << p1->GetAge() << endl; cout << p1->ToString() << endl; Student * s1 = new Student("Bam Bam", 12, "Hunting Mammoths", 9); cout << s1->GetName() << endl; cout << s1->GetAge() << endl; cout << s1->ToString() << endl; Developer * d1 = new Developer("Barney", 32, 34000, 3); cout << d1->GetName() << endl; cout << d1->GetSalary() << endl; cout << d1->ToString() << endl; d1->Promote(); cout << d1->GetSalary() << endl; cout << d1->YearsToRetire() << endl; d1->AddSkill("C++"); cout << d1->ToString() << endl; if (d1->HasSkill("Basic Programming") ) cout << d1->GetName() << " has the skill 'Basic Programming'." <GetName() << " doesn't have the skill 'Basic Programming'." <GetName() << endl; cout << d2->GetSalary() << endl; cout << d2->ToString() << endl; d2->Promote(); cout << d2->GetSalary() << endl; cout << d2->YearsToRetire() << endl; d2->AddSkill("C#"); cout << d2->ToString() << endl; if (d2->HasSkill("SQL") ) cout << d2->GetName() << " has the skill 'SQL'." <GetName() << " doesn't have the skill 'SQL'." <GetName() << endl; cout << m1->GetSalary() << endl; cout << m1->ToString() << endl; m1->Promote(); cout << m1->GetSalary() << endl; cout << m1->YearsToRetire() << endl; cout << m1->GetSector() << endl; delete p1; delete s1; delete d1; delete m1; return 0; }