Question: Write a program that will allow the user to calculate the gross wages of several employees. There is a menu function that will print the

Write a program that will allow the user to calculate the gross wages of several employees.

There is a menu function that will print the possible choices the user may make in manipulating the data and a switch that will process the choice. It will incorporate a getdata function and arrays to allow the user to input employee data (name, id number, hours worked and hourly rate).

There is a function that will calculate the gross wages for each employee using the nested if else statements of an earlier program to deal with overtime issues. It will also calculate the total payroll for the week.

It will have a print function that will include a heading and will output the name, id number(with leading zeros) hours worked, hourly rate and gross wages in tabular form. It will also compute the weekly payroll.

An optional function would allow the user to edit an employees hours worked and hourly rate. It would then recalculate the gross pay of the employee. You can access the employee record using either id number or name. Another optional function will allow the user to sort the employee records.

The functions must contain the following parameters:

void GetData(string FullNamef[], int EmployeeNumberf[], float HoursWorkedf[], float HourlyRatef[], int &Indexf);

void ComputePay(float HoursWorkedf[], float HourlyRatef[], float TotalPayf[],float &TotalPayrollf, int Indexf);

void PrintResults(string FullNamef[], int EmployeeNumberf[], float HoursWorkedf[], float HourlyRatef[], float TotalPayf[],float TotalPayrollf, int Indexf);

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!