Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

+Create a WorkerDemo class Inside main() using the createWorker metod in each ca

ID: 3547617 • Letter: #

Question

+Create a WorkerDemo class
                Inside main() using the createWorker metod in each case, create:
                

+A ProductionWorker objest using the data:
  John Smith, 123, 11-15-2009, day shift, $16.50

+Use an invalid employee number:

  John Smith, 1223, 11-15-2009, day shift, $16.50

+ Use an invalid shift number

   John Smith, 123, 11-15-2009, night shift, $16.50

+ Use a negative pay rate

   John Smith, 123, 11-15-2009, day shift, $-99.50

+Create a method called createWorker
                Attempt to create a new ProductionWorker instance, and catch any resulting EXCEPTIONS, such as INvalidEmployeeNumber, InvalidShift, InvalidPayRate.
                Output should show the objest created with all of its fields along with any  EXCEPTION messages.

                Create an Employee class with the following methods:
                Defualt constructor, overloaded constructor, setName, SetEmployeeNumber, setHireDate, getName, getEmployeeNumber, getHireDate, isValidEmpNum, toString

                Create an InvalidEmployeeNumber class with a default constructor
                Create an InvalidPayRate class with a default constructor
                Create an InvalidShift class with a default constructor
                Derive a PorductionWorker class from the Employee class.
                Include the following methods: default constructor, overloaded constructor, setShift, setPayRate, getShift, getPayRate, toString

Explanation / Answer

+Create a WorkerDemo class Inside main() using the createWorker metod in each ca