Write the program logic that will compute the paycheck of an employee. This is as much an exercise in designing your logic as much as a programming exercise in the grammar and syntax.
Your program's logic will perform a user to perform the following:
1. Enter the employee's LAST Name
2. Enter the employee's FIRST Name
3. Enter the employee's ID Number
4. Enter the employee's Total Hours Worked up to a maximum of 60 hours
5. Enter the employee's Pay Per Hour. The Pay per hour cannot be more than $100.00 per hour. It cannot be less than the minimum wage (i.e. $8.50 per hour). Detect any erroneous pay rate and set it to a default. If less than the minimum hourly wage, set to the minimum hourly wage. If greater than the maximum rate then set that employee to the maximum rate. Display an appropriate “error message” telling that data entry clerk what they did.
6. Federal tax rate and State tax rate range from zero to 40%. State and Federal tax rates cannot exceed a combined 80%.
7. Calculations include:
a) Compute the Regular Pay (any hours up to 40 hours) Regular Hours X Pay Per Hour
b) Compute the Overtime Pay if ANY (hours OVER 40 hours)
Overtime Hours X Pay Per Hour X 1.25 ("time and a quarter" for overtime)
c) Compute Gross Pay
Regular Pay + Overtime Pay (if NO overtime then Overtime Pay is zero)
d) Compute Federal Taxes Withheld (assume 20% rate, i.e. 0.2) Gross Pay X Federal Tax Rate
e) Compute State Taxes Withheld (assume 5% rate, i.e. 0.05) Gross Pay X State Tax Rate
f) Compute Net Pay (Gross Pay - Federal Taxes Withheld - State Taxes Withheld)
Output the employee's LAST Name, FIRST Name, ID Number, Total Hours, Regular Hours, Overtime Hours, if any (if NO overtime hours then don't print it), Gross Pay, Regular Pay, Overtime Pay, if any (if NO overtime hours then don't print it), Federal Taxes Withheld, State Taxes Withheld, Net Pay. Output format, I leave to your imagination (i.e. some sort of if statement?).
output where i have to show last name , first name , id, total hours, regular hours
then regular hour and over time
then gross pay then federal tax and state tax . i need the constant declare