Question: PLEASE PROVIDE ACODE IN JAVA Design a HourlyWorker class. The class should store the payrate passed to it in its constructor. If the payrate is
PLEASE PROVIDE ACODE IN JAVA
Design a HourlyWorker class. The class should store the payrate passed to it in its constructor. If the payrate is less than 0, throw an exception, InvalidPayRate. The error message should say The pay rate cannot be negative. and should include the payrate in the message.
The test class should prompt the user to enter the pay rate.
Submit three java files, HourlyWorkder, InvalidPayRate, and test classes.
Other Requirements:
Add Comments in your program.
The program should have proper formatting.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
