Question: In C++ This program is an exercise in array processing. The input file has a list of employees records. Each record contains: Employee_name hourly_wage hours_worked

In C++

This program is an exercise in array processing. The input file has a list of employees records. Each record contains:

Employee_name hourly_wage hours_worked

You are to:

First read all the data into three arrays before processing any records.

Report the number of records read in.

Report the employee with the highest wage in the group.

Report the employee with the lowest wage in the group.

Report average pay for all employees

Print a final report, reporting names, gross pay, etc.

Add a $50 bonus to the gross pay of any person working more than 45 hours.

Fine an employee $.25 an hour if they work less than 30 hours.

Use one output file for your results.

A sample input file looks like the following:

Clinton 10.00 10

Lincoln 5.00 50

Washington 32.00 35

Kennedy 4.99 45

Nixon 10.00 25

The corresponding sample output would be:

Number of Employees: 5

Maximum Pay Rate: Washington @ $32.00

Minimum Pay Rate: Kennedy @ $4.99

Average Pay: $12.40

October 2009 Payroll:

Name Hours Rate Gross Bonus Adjusted Gross

Clinton 10 10.00 100.00 N 97.50

Lincoln 50 5.00 250.00 Y 300.00

Washington 35 32.00 1120.00 N 1120.00

Kennedy 45 4.99 224.55 N 224.55

Nixon 25 10.00 250.00 N 243.75

GENERAL REQUIREMENTS

(15%) You must use main() and at least three additional functions: process_payroll(), process_employees(), and print_results(). Optional to have more functions to calculate maximum, minimum, and average pay.

(15%) You will need to use at least three arrays for this program. These arrays are hours, wage, and employee. The maximum size for all arrays will be 15. You may need to use other arrays for gross and adjusted_gross.

(10%) There will be at least 5 names to read in. I expect to see error processing in case more than 10 names are attempted to be read in. I want you to process all records just indicate an error if more than 10 names are read in.

(5%) The minimum pay rate should be before any fines are levied.

(5%) Make up variable names that are meaningful.

(5%) Indent consistently and use white space (blanks and blank lines) appropriately.

(5%) Have a block comment at the start of your program with name, etc.

(5%) Have a block comment before each function with the name and a short description.

(5%) Use additional comments as necessary.

(5%) Use symbolic constant values such as penalty (e.g. const float PENALTY = 0.25;)

(5%) Prototype your functions.

(5%) Do NOT use global variables

(5%) Correctness of summary output

(5%) alignment of summary output

(15%) Correctness of maximum, minimum , and average pay

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!