Question: Derive a class RegularPay from PayCalculator, as described in the previous exercise. It should have a constructor that has a parameter for the pay rate.
Derive a class RegularPay from PayCalculator, as described in the previous exercise. It should have a constructor that has a parameter for the pay rate. It should not override any of the methods. Then derive a class HazardPay from PayCalculator that overrides the computePay method. The new method should return the amount returned by the base class method multiplied by 1.5.
Step by Step Solution
3.47 Rating (173 Votes )
There are 3 Steps involved in it
public class RegularPay extends PayCalculator Creates a new instance of RegularPay ... View full answer
Get step-by-step solutions from verified subject matter experts
