Question
Your JAVA code will ask the user to input hours worked and base pay (regular pay rate). Determine whether hours worked is greater than 40
Your JAVA code will ask the user to input hours worked and base pay (regular pay rate).
Determine whether hours worked is greater than 40 hours:
If hours worked is greater than 40, then regular pay will be calculated at 40 hours (Full Week Hours) * pay rate.
Overtime Pay will be calculated at (hour worked - Full Week Hours) * OT rate * pay rate.
If hours worked is not greater than 40, then regular pay will be calculated as hours worked * pay rate.
There will be no Overtime Pay
Display two output statements:
Output statement #1: Regular pay is $ and overtime pay is $
Output statement #2: Gross pay, including overtime pay is $
Your code should have at least 4 variables and 2 named constants. Remember, that constants are used when you can assign a fixed value that will not change during the execution of the code.
Hint: How many hours are in a typical work week? What is the typical overtime pay factor?
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