10.11 Exception Project class | Starting Out With Java

preview_player
Показать описание
#java #startingOutWithJava #chegg

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

1) The Employee class should throw an exception named InvalidEmployeeNumber when it receives an employee number that is less than 0 or greater than 9999.
2) The ProductionWorker class should throw an exception named Invalid Shift when it receives an invalid shift.
3) 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 condition work.
Рекомендации по теме
join shbcf.ru