Create a class named Pay that includes five double variables that hold hours worked, rate of pay per hour, withholding rate, gross pay, and net pay. Create three overloaded computeNetPay() methods. When computeNetPay() receives values for hours, pay rate, and withholding rate, it computes the gross pay and reduces it by the appropriate withholding amount to produce the net pay. (Gross pay is computed as hours worked multiplied by pay per hour.) When computeNetPay() receives two parameters, they represent the hours and pay rate, and the withholding rate is assumed to be 15%. When computeNetPay() receives one parameter, it represents the number of hours worked, the withholding rate is assumed to be 15%, and the hourly rate is assumed to be 5.85. Write a main() method that tests all three overloaded methods. Save the application as Pay.java.
Create a class named Pay that includes five double variables that hold hours worked, rate of pay per hour, withholding rate, gross pay, and net pay. Create three overloaded computeNetPay() methods. When computeNetPay() receives values for hours, pay rate, and withholding rate, it computes the gross pay and reduces it by the appropriate withholding amount to produce the net pay. (Gross pay is computed as hours worked multiplied by pay per hour.) When computeNetPay() receives two parameters, they represent the hours and pay rate, and the withholding rate is assumed to be 15%. When computeNetPay() receives one parameter, it represents the number of hours worked, the withholding rate is assumed to be 15%, and the hourly rate is assumed to be 5.85. Write a main() method that tests all three overloaded methods. Save the application as Pay.java.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images