Question: Programming PayCalculator - Write in java and include comments Create an abstract class PayCalculator that has an attribute payRate given in dollars per hour. The

Programming PayCalculator - Write in java and include comments

Create an abstract class PayCalculator that has an attribute payRate given in dollars per hour. The class should also have a method computePay(hours) that returns the pay for a given amount of time.

Derive a class RegularPay from PayCalculator, as described above. 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.

Grading Rubric

Task

Points

Working solution for the problem

5

Best practices in programming

1

Total

6

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!