Question: Complete C++ program for Payroll of Employees do the folowing: 1. Print the following header at the top of the output page: Hills Corporation Payroll

Complete C++ program for Payroll of Employees do the folowing:

1. Print the following header at the top of the output page:

Hills Corporation Payroll

2. Read an unknown number of employee data records as shown below. Each group of data will contain employee's first and last name, hours worked, rate of pay and age. A typical group of data will be:

O'Doyle Tom

45.00 3.25 51

Print the data as it is read; together with appropiate message (e.g., the name is...., the rate of pay is.....,etc).

3. For each employee, compute and print the employee's base pay, which includes overtime( paid at one and half times the normal rate) for each hour over 40. For example, if an employee earning $20.00 per hour works for 48 hours, then she will be paid for 40 hours at her normal rate plus 8 extra hours at $30.00 (one and a half times $20.00).

4. For each employee compute the tax paid by the employee, accoriding to this formula: If the employee is 55 years old (or older), then the employee pays tax at a rate of 50% of the base pay; if the employee is below 55, then the tax is 10% of the base pay. Print the tax and the net pay after taxes.

5. Repeat this process until you have read the last employee. You must decide how to detect the end of the data(you should explian your method in a comment).

6. Print the age and name of the oldest employee. Do the same for the youngest employee.

7. After all your results have been printed, print a message saying that the payroll program is complete.

The data below should be placed in a text file named hillscorp.txt.

Data:

O'Doyle Tom

45.0 3.50 60

Smith John

35 3.50 55

Johnson Charles

35 3.50 20

Davis William

40 3.50 60

Wilson Robert

45 3.50 20

Garcia David

40 3.50 20

Anderson Richard

45 3.50 55

Taylor Michael

35 3.50 60

Garcia James

40 3.50 55

Lopez Joseph

40 3.50 30

Walker Paul

45 3.50 25

Clark Christopher

35 3.50 20

Lopez Matthew

25 3.50 30

Perez Anthony

35 3.50 25

Jackson Jack

45 3.50 30

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!