The number in parentheses at the end of an exercise refers to the learning objective listed at the beginning of the chapter.
Consider the definition of the class employee as given in Exercise 8. Answer the following questions: (1, 2, 3, 5)
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.
e. Write the definition of the function getSalary to return the value of the instance variable salary.
f. Write a program to test the class employee.
Reference:
Consider the definition of the following class: (1, 2, 3, 5, 7)
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.