Question
COBOL ASSIGNMENT Employee Pay Calculations Using the IF Statement: Calculate Gross considering Overtime based on Hourly or Salary Pay Type, Taxes and Net Pay &
COBOL ASSIGNMENT Employee Pay Calculations Using the IF Statement:
Calculate Gross considering Overtime based on Hourly or Salary Pay Type, Taxes and Net Pay & Display the amounts for two payroll records, and provide programs totals for each. The TITLE of each employee will be determined by the EMP-POSITION code.
This program uses the File Layout (EMPLOYEE-RECORD-IN) used in the previous assignment. It will read in the same type of records, ACCEPTING (READING) two records. Insert
190104A01LASTNAME FIRSTNAME 10002500S-
190104A02LOVELACE ROBERT 50002500HI
into the STDIN for execution.
Expanded to do the additional calculations and DISPLAY the Postion Title (PROGRAMMER, ACCOUNTANT, MANAGER, INTERN, TESTER). Use an IF Statement to look at the EMP-POSITION and set the EMP-TITLE to the appropriate title.
Only valid position types should be accepted, if not provide a display of the error and set the EMP-TITLE to "UNDEFINED POSITION"
The program will be updated to calculate Gross Pay considering Overtime (EMP-GROSS-PAY), then calculate the Taxes (EMP-TAXES) and Net Pay (EMP-NET-PAY) on the amount.
Here are the Overtime Calculation Business Rules:
Salaried Employees are always paid for 40 hours regardless of the number of hours worked.
Salaried Employee Overtime hours are reported and added to the Overtime Hours Totals for the program, but they are not paid for overtime.
Hourly Employees are paid time and a half (1.5) for hours greater than 40 hours. So, if an hourly employee earning $20 and hour worked 2.50 hours of overtime, they would be paid for 40 hours at $20/hour and 2.50 hours at $30.00 an hour.
If the Pay Type is undefined, or invalid, Calculate OT hours over 40, but do not pay time and half. So an invalid position type employee that work 45 hours, at $20/hour, would be paid 45 * 20, or $900.00.
There are many ways to calculate these amount. Develop a calculation that makes sense to you.
Added to each record display:
TITLE OT PAY OT HOURS
The TOTALS section of DISPLAYS will also include:
OT HOURS OT PAY AVERAGE GROSS AVERAGE NET
The EMP-TAX-RATE should still be set to 32%. You may move this value to EMP-TAX-RATE, or use the VALUE clause to define the rate.
Add the Run Date to the Output Display. The date will need to be accepted in the program and then displayed.
Add the AUTHOR and DATE-WRITTEN fields to the IDENTIFICATION DIVISION.
Change all FN, LN, Firstname & Lastname references to your name, and FL to your first and last name initials.
Here is a permalink shell (Links to an external site.) to begin with, or you may start from scratch.
Extra Credit is available by allowing UPPER and lowercase position types (+5%).
OUTPUT:
PAYROLL HW04FL FOR FN LN PROGRAM BEGINS: 01/15/2019 -- RECORD #1: 190104A01LASTNAME FIRSTNAME 10002500SP PAY DATE : 01/04/19 EMPLOYEE NAME: LASTNAME , FIRSTNAME NUMBER : A01 HOURS : 10.00 PAY RATE : 25.00 POSITION : P TITLE : PROGRAMMER PAY TYPE : S GROSS PAY: 1000.00 OT PAY : 000.00 OT HOURS : 00.00 TAXES : 0320.00 NET PAY : 0680.00 -- RECORD #2: 190104A02LOVELACE ROBERT 50002500HI PAY DATE : 01/04/19 EMPLOYEE NAME: LOVELACE , ROBERT NUMBER : A02 HOURS : 50.00 PAY RATE : 25.00 POSITION : I TITLE : INTERN PAY TYPE : H GROSS PAY: 1375.00 OT PAY : 375.00 OT HOURS : 10.00 TAXES : 0440.00 NET PAY : 0935.00 -- FILE TOTALS: RECORDS : 2 HOURS : 0060.00 GROSS : 2375.00 TAXES : 0760.00 NET : 1615.00 OT HOURS : 10.00 OT PAY : 375.00 AVERAGE GROSS: 1187.50 AVERAGE NET: 0807.50 -- EXTRA CREDIT: Upper and Lowercase EMP-POSITION Accepted + 5% -- END OF PROGRAM FOR FIRSTNAME LASTNAME
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started