#include <iostream>
class employee
{
public:
int GetAge() const;
void SetAge( int age);
int SetYearsOfService( int years);
int SetSalary (int salary);
int GetYearsOfService()const;
int GetSalary()const;
private:
int Age;
int YearsOfService;
int Salary;
};
void employee::SetAge(int age)
{
return Age=age;
}
int employee::GetAge()
{
return Age;
)
void employee::SetYearsOfService(int years)
{
return YearsOfService=years;
}
int employee::GetYearsOfService()
{
return YearsOfService;
}
void employee::SetSalary (int salary)
{
return Salary=salary;
}
int employee::GetSalary()
{
return Salary;
}
using namespace std;
int main()
{
employee John;
employee Sally;
John.SetAge (30);
John.SetYearsOfService(5);
John.SetSalary(50000);
Sally.SetAge(32);
Sally.SetYearOfService(5);
Sally.SetSalary(40000);
cout<<"At AcmeSexist company, John and Sally have the same job \n";
cout<<"John is "<<John.GetAge()<<" years old and he has with";
cout<<"the firm for "<<John.GetYearOfService()<<"years \n";
cout<<"John earns $"<<John.GetSalary()<<"dollars per year.\n";
cout<<"Sally on the other hand is "<<Sally.GetAge()<<"years old and has";
cout<<"been with the company "<<Sally.GetYearOfService();
cout<<"years. Yet Sally only makes $" <<Sally.GetSalary();
cout<<"dollars per year! Something here is unfair. ";
int x;
cin>>x;
return 0;
}