subject

Consider the definition of the class employee as given below. answer the following questions: 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 }; //line 17

a. write the definition of the function setdata so that the instance variables are set according to the parameters.
b. write the definition of the function print to output the values of the instance variables.
c. write the definition of the function updatesalary to update the value of the instance variable salary by adding the value of the parameter.
d. write the definition of the function getnumofserviceyears to return the value of the instance variable numofserviceyears.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:30
This isn’t really school related, but like where the heck can you find manga, to read to where you don’t have to pay money, for points? my friend wants me to read bj alex, and i can’t find it anywhere for free.
Answers: 2
question
Computers and Technology, 22.06.2019 19:10
What a backup plan that you have created in a event you encounter a situation
Answers: 2
question
Computers and Technology, 24.06.2019 00:30
The best definition of an idiom is a. a word or phrase that describes a noun b. a word or phrase describing a verb c. a phrase containing figurative language in which the word expresses a different idea from its exact meaning d. a phrase that compares two unlike objects or ideas
Answers: 2
question
Computers and Technology, 24.06.2019 13:00
Think of a spreadsheet as a giant calculator spread of paper chart data collector
Answers: 2
You know the right answer?
Consider the definition of the class employee as given below. answer the following questions: class...
Questions