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 18:30
An attribute on a webpage allows you to set borders and change background colors. true or false
Answers: 1
question
Computers and Technology, 22.06.2019 04:30
Which of the statements below is true? the formatting, standard, and drawing commands are unavailable. the formatting, standard, and drawing commands have been used. the formatting, standard, and drawing toolbars are displayed. the formatting, standard, and drawing toolbars are hidden.
Answers: 1
question
Computers and Technology, 23.06.2019 22:20
Read “suburban homes construction project” at the end of chapters 8 and 9 (in the textbook) and then develop a wbs (work breakdown structure) in microsoft excel or in microsoft word (using tables)
Answers: 1
question
Computers and Technology, 24.06.2019 00:40
What is the error in the following pseudocode? module main() call raisetopower(2, 1.5) end module module raisetopower(real value, integer power) declare real result set result = value^power display result end module
Answers: 1
You know the right answer?
Consider the definition of the class employee as given below. answer the following questions: class...
Questions
question
Mathematics, 19.07.2019 04:00
Questions on the website: 13722367