Ask Question
1 February, 17:19

In Java Fill in the missing code in the totalWages method, which calculates the total earnings for a week based on the number of hours worked and the hourly rate. The pay for overtime (hours worked over 40 0 is 1.5 times the regular rate. For example, totalWages (45, 12.50) should return 593.75.

public double totalWages (double hours, double rate)

{

double wages;

return wages;

}

+1
Answers (1)
  1. 1 February, 19:09
    0
    Wages = 0.0;

    if (hours > 40.0)

    wages = (hours - 40.0) * rate * 1.5;

    hours = 40.0;

    wages + = (hours * rate);
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “In Java Fill in the missing code in the totalWages method, which calculates the total earnings for a week based on the number of hours ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers