Problem

In this exercise, you create a program that calculates and displays gross pay amounts. T...

In this exercise, you create a program that calculates and displays gross pay amounts. The user will enter the number of hours an employee worked and his or her pay rate. The program should contain four value-returning functions: main, getHoursWorked, getPayRate, and calcGross. The main function should call each of the other three functions and then display the gross pay on the screen. When coding the calcGross function, you do not have to worry about overtime pay. You can assume that everyone works 40 or fewer hours per week. The hours worked and rate of pay may contain a decimal place. Use a sentinel value to end the program.

a. Create IPO charts for the problem, and then desk-check the algorithm using the following two sets of hours worked and pay rates: 25.5, $12; 40, $11.55.

b. List the input, processing, and output items, as well as the algorithm, in a chart similar to the one shown earlier in Figure 9-52. Then code the algorithm into a program.

c. Desk-check the program using the same data used to desk-check the algorithm.

d. If necessary, create a new project named Advanced24 Project and save it in the Cpp7\Chap09 folder. Enter your C++ instructions into a source file named Advanced24.cpp. Also enter appropriate comments and any additional instructions required by the compiler.

e. Save and then run the program. Test the program using the same data used to desk-check the program.

REFERENCE : FIGURE 9-52

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