Write program creates employee and productionworker classes


Problem

Write program that creates Employee and ProductionWorker Classes. The Employee class keeps data attributes for the following pieces of information:

• Employee name
• Employee number

The ProductionWorker class is a subclass of Employee class. The ProductionWorker class should keep data attributes for the following information:

• Shift number (an integer, such as 1, 2, and 3)
• Hourly pay rate

The workday is divided into two shifts: day and night. The shift variable will hold an integer value representing the shift that the employee works. The day shift is shift 1, and the night shift is shift 2. Provide a constructor and the appropriate accessor and mutator functions for the class. Demonstrate the classes by applying a Python list of ProductionWorker objects in your main program.

Extend your program above by adding the following requirements: In a particular factory, a shift supervisor is a salaried employee who supervises a shift. In addition to a salary, the shift supervisor earns a yearly bonus when his or her shift meets production goals. Add a ShiftSupervisor class that is derived from the Employee class. The ShiftSupervisor class should have a member variable that holds the annual salary and a member variable that holds the annual production bonus that a shift supervisor has earned. Provide appropriate constructor, accessor, and mutator functions for the class. Demonstrate the class by applying a Python List of ShiftSupervisor objects in your main program. Make up all values.

Request for Solution File

Ask an Expert for Answer!!
Python Programming: Write program creates employee and productionworker classes
Reference No:- TGS03268344

Expected delivery within 24 Hours