Answered step by step
Verified Expert Solution
Question
1 Approved Answer
class employee //Line 1 { //Line 2 public: //Line 3 employee(); //Line 4 employee(string, int, double); //Line 5 employee(int, double); //Line 6 employee(string); //Line 7
class employee //Line 1
{ //Line 2
public: //Line 3
employee(); //Line 4
employee(string, int, double); //Line 5
employee(int, double); //Line 6
employee(string); //Line 7
void setData(string, int, double); //Line 8
void print() const; //Line 9
void updateSalary(double x); //Line 10
int getNumOfServiceYears() const; //Line 11
double getSalary() const; //Line 12
private: //Line 13
string name; //Line 14
int numOfServiceYears; //Line 15
double salary; //Line 16
};
Write a program to test the class employee, and display output of the program below:
InfO OF Emp loyee One: Name Number OF service years: e InfO OF Employee TwO NameJohnHarris Number Of service years: 5 Salary : %25000-00 InfO Of Emp loyee Three : NaneSamantha Number OF service years: 15 Salary 569-99 InfO Of Employee One: NaneJohn Doe Number OF service years: 3 Salary $298-75 InfO OF Employee Four: Name:Nancy Lopez Number OF service years : 1e Salary: $3679-25 Info OF Employee Five: Name: Number OF service years: 7 Salary %15670-88 Press any key to continue Able Garcia . InfO OF Emp loyee One: Name Number OF service years: e InfO OF Employee TwO NameJohnHarris Number Of service years: 5 Salary : %25000-00 InfO Of Emp loyee Three : NaneSamantha Number OF service years: 15 Salary 569-99 InfO Of Employee One: NaneJohn Doe Number OF service years: 3 Salary $298-75 InfO OF Employee Four: Name:Nancy Lopez Number OF service years : 1e Salary: $3679-25 Info OF Employee Five: Name: Number OF service years: 7 Salary %15670-88 Press any key to continue Able GarciaStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started