Employee and ProductionWorker Classes Design a class named Employee . The class
ID: 3535937 • Letter: E
Question
Employee and ProductionWorker Classes
Design a class named Employee. The class should keep the following information in fields:
Write one or more constructors and the appropriate accessor and mutator methods for the class.
Next, write a class named ProductionWorker that extends the Employee class. TheProductionWorker class should have fields to hold the following information:
The workday is divided into two shifts: day and night. The shift field will be an integer value representing the shift that the employee works. The day shift is shift 1 and the night shift is shift 2. Write one or more constructors and the appropriate accessor and mutator methods for the class. Demonstrate the classes by writing a program that uses aProductionWorker object.
Modify the Employee and ProductionWorker classes so they throw exceptions when the following errors occur:
Write a test program, WorkerDemo.java, that demonstrates how each of these exception conditions works.