Ask Question
10 February, 03:10

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. 10 February, 03:46
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers