Question: Modify the Employee and Production Worker classes so they throw exceptions when the following errors occur: The Employee class should throw an exception named Invalid
Modify the Employee and Production Worker classes so they throw exceptions when the following errors occur:
The Employee class should throw an exception named Invalid Employee Number when it receives an invalid employee number
The Production Worker class should throw an exception named Invalid Shift when it receives an invalid Shift
The Production Worker class should throw an exception named invalid Pay Rate when it receives a negative number for the hourly pay rate. Write a test program that demonstrates how each of these exception conditions works. ________
The Employee and production Worker classes from HW #2 _______ Employee and Production Worer Classes Design a class named Employee. The class should keep the following information in fields:
Employee name
Employee number
Hire date
Write one or more constructors and the appropriate accessor and mutator methods for the class. Next, write a class named Production Worker that extends the Employee class.
The Production Worker class should have fields to hold the following formation:
Shift (an integer)
Hourly pay rate (a double)
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
