I would just like to know how to write these programs and the proper way in which to go about doing so.


Question #1

In this exercise you create a program that displays an employee’s name and gross pay.
a) The figure below shows the partially completed IPO chart for the payroll program. Employees working more than 40 hours should be paid time and one-half for the hours worked over 40. Complete the IPO chart.

Input Processing Output
Name
Hours worked
Pay rate Processing items: none

Algorithm:
Name
Gross pay


B) Open the ch5AppE01 solution (ch5AppE01 solution.sln) file, which is contained in the cpp5\chap05\ch5AppE01 solution folder. Use the IPO chart you completed in step a to complete the program.

C) Complete a desk-check table for the program. First use Jack Henderson as the name, 35 as the hours worked, and 10 as the hourly pay rate. Then use Mary Matiez as the name, 45 as the hours worked, and 7.50 as the hourly pay rate.

d) Save and build the solution. Execute the program. Use the data from step c to test the program. When the program is working correctly, use the file menu to close the solution.


Question #2

In this exercise, you create a program that displays the average of three test scores entered by the user.
a) Complete an IPO chart for the average program. Be sure to validate the input data. To be valid each test score must be greater than or equal to 0. If one or more test scores are not
Valid, the program should display an appropriate message.

b) Complete a desk-check table for the algorithm, using the following two groups of test scores
95.5, 76, and 59
45, -78, and 30 (notice the minus sign before the number 78)

c) Use the file menu to create a new Win32 console application. Assign the names ch5AppE04 project and ch5AppE04 solution to the project and solution, respectively. Save the application in the cpp5\chap05 folder.

d) Add a new c++ source file to the project. Name the source file ch5AppE04. Enter the appropriate c++ instructions into the source file.

e) Save and build the solution. Execute the program. Test the program using the data supplied in step b. when the program is working correctly, use the file menu to close the solution.