Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Database Modeling With Neo4j

Authors: Ajit Singh

2nd Edition

B0BDWT2XLR, 979-8351798783

More Books

Students also viewed these Databases questions

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago