Problem

Exception ProjectThis assignment assumes you have completed Programming Challenge 1 of Cha...

Exception Project

This assignment assumes you have completed Programming Challenge 1 of Chapter 11 (Employee and ProductionWorker Classes). Modify the Employee and ProductionWorker classes so they throw exceptions when the following errors occur:

• The Employee class should throw an exception named InvalidEmployeeNumber when it receives an employee number that is less than 0 or greater than 9999.

• The ProductionWorker class should throw an exception named InvalidShift when it receives an invalid shift.

• The ProductionWorker class should throw an exception named InvalidPayRate when it receives a negative number for the hourly pay rate.

Write a test program that demonstrates how each of these exception conditions works.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT