// File: PublicEmployee.cpp // Implementation of PublicEmployee isa Person #include #include "PublicEmployee.h" using namespace std; PublicEmployee::PublicEmployee(const string &first,const string &last, const string &SSN,int birthMonth,int birthDay,int birthYear, GovernmentLevel entity,float amount): // superclass constructor invocation Person(first,last,SSN,birthMonth,birthDay,birthYear) {setEntity(entity); setSalary(amount); } void PublicEmployee::setEntity(GovernmentLevel entity) {which=entity; } void PublicEmployee::setSalary(float amount) { salary=amount; } float PublicEmployee::getSalary() const {return(salary); } // Why is this here, when it has no code? void PublicEmployee::print(ostream &Dest) const {} ostream &operator<<(ostream &Dest,const PublicEmployee &PE) {const Person *pPtr=&PE; // This pointer must be const. Why? Dest << *pPtr; Dest << "Government Level:" << PE.which << " Salary:$" << PE.salary << endl; return(Dest); }