subject

Write the class definition for a class named Employee. The class should include data members for an employee object%u2019s name and salary. (The salary will be an integer). The class should contain two member functions: the constructor and a function that allows a program to assign values to the data members.

Step 2:

Add two member functions to the Employee class. One member function should allow any program using an employee object to view the contents of the salary data member. The other member function should allow the program to view the contents of the employee name data member. (Hint: Have the member function simply return the contents of the appropriate data member.)

Sep 3:

Add another member function to the Employee class. The member function should calculate an employee object%u2019s new salary, based on a raise percentage provided by the program using the object. Before calculating the raise, the member function should verify that the raise percentage is greater than or equal to zero. If the raise percentage is less than zero, the member function should display an error message.

Step 4:

The instructions to create an employee object, assign values to the object, display the name and current salary, calculate the new salary, and then display the new salary are missing from the program. Complete the program, using these comments as a guide.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 20:20
Write python code that prompts the user to enter his or her favorite color and assigns the user’s input to a variable named color.
Answers: 1
question
Computers and Technology, 24.06.2019 22:30
In writing a paper for his english class, gavin quoted an author of the book. what should he include in his paper to credit the source? citation caption header entry
Answers: 1
question
Computers and Technology, 25.06.2019 08:00
Is a major factor in the widespread use of global information systems
Answers: 1
question
Computers and Technology, 25.06.2019 08:20
In the context of computer operations division is a(n)
Answers: 2
You know the right answer?
Write the class definition for a class named Employee. The class should include data members for an...
Questions
question
Social Studies, 20.04.2020 19:28
Questions on the website: 13722360