Ask Question
1 August, 02:45

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;

}

+4
Answers (1)
  1. 1 August, 02:59
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers