Programming Assignment

Employee Payroll

 

Write a program that generates an Employee Payroll. The input for the program consists of a collection of data containing the name, hourly pay rate, and the number of hours worked, for a set of employees.

Your program should perform the following tasks:

Repeatedly prompt the user to determine whether or not there is data pertaining to an employee to be input. (Program should work for 0 or more employees.) If the user responds in the affirmative, the program prompts for each of the input data items for a single employee; the user responds in the negative when there is no more employee data to be processed.

For each employee you are to compute and print out the number of overtime hours worked by that employee, the salary, and the overtime pay. An employee earns straight time for the first forty hours of work, time-and-a-half for up to the first 10 hours in excess of 40 hours, and double-time for any additional hours.

After there are no more employees to process, the program should print out the total number of hours, overtime hours, overtime salary, and total salary for all employees combined. In addition it should print out the total number of employees.

Use the below Data:
 Name Hours  Hourly Rate
 Homer  30.0

 15.75
 Marge  54.5

 17.50
 Bart  40.0

 14.00
 Lisa  50.0

 14.00
 Maggie 42.2

12.25

 

You should store the name, hours, and hourly rate in a structure.
In designing your program, use
functions as needed.
Make sure to
comment your program.

Hand in your program, input, and output.  Remember to use the above example.