I need help writing the basic pseudocode(not java) for this problem. The owners
ID: 3788381 • Letter: I
Question
I need help writing the basic pseudocode(not java) for this problem.
The owners of the Super Supermarket would like to have a program that computes the monthly gross pay of their employees as well as the employee’s net pay. The input for this program is an employee ID number, hourly rate of pay, and number of regular and overtime hours worked. Gross pay is the sum of the wages earned from regular hours and overtime hours; overtime is paid at 1.5 times the regular rate. Net pay is gross pay minus deductions. Assume that deductions are taken for tax withholding (30 percent of gross pay) and parking ($10 per month). You will need the following variables: EmployeeID HourlyRate RegHours OvertimeHours GrossPay Tax Parking NetPay
You will need the following formulas:
GrossPay = (RegularHours * HourlyRate) + (OvertimeHours * (HourlyRate * 1.5)) NetPay = GrossPay – (GrossPay * Tax) – Parking
Explanation / Answer
You will first need to take the input from user.
Employee id can be taken as integer but I would rather recommend you to take it as double.
Next hourly rate of pay can be taken in float. Number of regular hours work will always be a positive integer so take it as unsigned integer. Overtime hours is also taken as integer.
Now Gross Pay.
It is highly recommended to convert all the integer and float values to double for precision calculation.
Now simply implement the formula and you are done with code.