Question: Write a method called pay that accepts two parameters: a real number for a TAs salary, and an integer for the number of hours the

Write a method called pay that accepts two parameters: a real number for a TA’s salary, and an integer for the number of hours the TA worked this week. The method should return how much money to pay the TA. For example, the call pay(5.50, 6) should return 33.0. The TA should receive “overtime” pay of 11/2 times the normal salary for any hours above 8. For example, the call pay(4.00, 11) should return (400 * 8) + (600 * 3) or 50.0.

Step by Step Solution

3.49 Rating (159 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

public static double pay double salary int hours if hours ... View full answer

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 Building Java Programs A Back to Basics Approach Questions!