Question: Given: double hours _ worked; double pay _ rate; double gross _ pay; Assume the values of hours _ worked, pay _ rate, and gross

Given:
double hours_worked;
double pay_rate;
double gross_pay;
Assume the values of hours_worked, pay_rate, and gross_pay have been entered. Write a Java code fragment to calculate gross pay based upon the following rules:
The employee receives regular pay for first 40 hours.
Pay double time for hours worked over 40 hours and less than 50
Pay triple time for hours worked over 50 hours.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!