Question: Create a C++ payroll calculation program to process payroll information. The program must calculate and display the following items: Data Item Variable Name Regular Pay

Create a C++ payroll calculation program to process payroll information.

The program must calculate and display the following items: Data Item Variable Name Regular Pay regularPay Overtime Pay overtimePay Gross Pay grossPay Union Dues unionDues Net Pay netPay

INPUT: User will enter the values in yellow for the data items below. Use the cin statement to accept the input data. Data Item Variable Name Data Type Sample 1st Run Sample 2nd Run Sample 3rd Run Employee ID empID int 123 456 789 Hours Worked hoursWorked double 25.0 40.0 50.0 Pay Rate payRate double 15.00 20.00 25.00 Union Code unionCode int 1 2 3

PROCESSING:

1.When an employee works more than 40 hours, regularPay is payRate times 40 hours overtimePay is 1.5 times payRate times (hoursWorked minus 40.0) grossPay is regularPay plus overtimePay

2.When an employee works 40 hours or less, regularPay is payRate times hoursWorked overtimePay is 0 (zero) grossPay is regularPay

3. Use the information in the following table to determine unionDues: unionCode unionDues 1 $15.00 2 $25.00 3 $35.00

4. Compute netPay as follows: netPay is grossPay minus unionDues.

OUTPUT: Display following information: empID hoursWorked payRate regularPay overtimePay grossPay unionDues netPay Special Instructions:

Program must be properly documented throughout.

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!