Write two class es named productionworker and


Python. Please include comments where needed to explain code and include a screenshot of output. T

Problem 1: Employee

Write an Employee class that keeps data attributes for the following pieces of information:

• Employee name

• Employee number

Next, write two class es named ProductionWorker and ShiftSupervisor that are subclass es of the Employee class. ProductionWorker Class The P roductionWorker class should keep data attributes for the following information:

• Shift number (an integer, such as 1, 2, or 3)

• Hourly pay rate

Shift attribute will hold an integer value representing the shift that the employee w orks. The day shift is shift 1 and the night shift is shift 2.

ShiftSupervisor Class

In a particular factory, a shift supervisor is a salaried empl oyee who supervises a shift. In addition to a salary, the shift supervisor earns a yearly bo nus when his or her shift meets production goals. The ShiftSupervisor class should keep a data attribute for the :

• Annual salary

• Annual production bonus that a shift supervisor has earned.

Write the appropriate accessor and mutator methods for each class.

Once you have written the classes, write a progra m that creates two objects, object of the ProductionWorker class and an object of ShiftSupervisor r class , and prompts the user to enter data for each of the object' s data attributes. Store the data in the object and then use the object' s accessor methods to retrieve it and display it on the screen.

Request for Solution File

Ask an Expert for Answer!!
Python Programming: Write two class es named productionworker and
Reference No:- TGS02906286

Expected delivery within 24 Hours