Problem

In this exercise, you use the Employee class from Pencil and Paper Exercise 4 to create...

In this exercise, you use the Employee class from Pencil and Paper Exercise 4 to create an Employee object. Follow the instructions for starting C++ and viewing the TryThis7.cpp file, which is contained in either the Cpp7\Chap15\TryThis7 Project folder or the Cpp7\Chap15 folder. (Depending on your C++ development tool, you may need to open this exercise’s project/solution file first.) If necessary, delete the two forward slashes that appear before the system("pause"); statement and then save the file. Add a header file named TryThis7 Employee.h. In the header file, enter the #include <string> and using namespace std; directives. Then enter the class definition you created in Pencil and Paper Exercise 4. Next, complete the TryThis7.cpp file by entering the appropriate instructions. Use the comments as a guide. Save and then run the program. Test the program by entering your name, a current salary amount of 54000, and a raise rate of .1. The program should display your name, current salary ($54000), and new salary ($59400). (The answers to TRY THIS Exercises are located at the end of the chapter.)

REFERENCE : Exercise 4

Include another public method in the Employee class from Pencil and Paper Exercise 3. The method should calculate an Employee object’s new salary, which is based on the raise percentage provided by the program using the object. Before making the calculation, the method should verify that the raise percentage is greater than or equal to 0.0. If the raise percentage is less than 0.0, the method should assign the number 0.0 as the new salary.

Step-by-Step Solution

Request Professional Solution

Request Solution!

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.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 15
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT