Computers and Technology

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.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 10:00, QueenKy9576
Wich technology can a website use to allow you to listen to a concert live over the internet?
Answers: 3
image
Computers and Technology, 23.06.2019 06:00, 573589
What machine listens for http requests to come in to a website’s domain? a. a router b. a browser c. a server d. a uniform resource locator
Answers: 1
image
Computers and Technology, 24.06.2019 03:30, glitch14
It is not necessary to develop strategies to separate good information and bad information on the internet. true or false
Answers: 1
image
Computers and Technology, 24.06.2019 17:00, kappy10
Anew author is in the process of negotiating a contract for a new romance novel. the publisher is offering three options. in the first option, the author is paid $5,000 upon delivery of the final manuscript and $20,000 when the novel is published. in the second option, the author is paid 12.5% of the net price of the novel for each copy of the novel sold. in the third option, the author is paid 10% of the net price for the first 4,000 copies sold, and 14% of the net price for the copies sold over 4,000. the author has some idea about the number of copies that will be sold and would like to have an estimate of the royal- ties generated under each option. write a program that prompts the author to enter the net price of each copy of the novel and the estimated number of copies that will be sold. the program then outputs he royalties under each option and the best option the author could choose. (use appropriate named constants to store the special values such as royalty rates and fixed royalties.
Answers: 1
Do you know the correct answer?
Write the class definition for a class named Employee. The class should include data members for an...

Questions in other subjects:

Konu
English, 08.01.2021 01:00
Konu
English, 08.01.2021 01:00