Question: In Phyton, write an Employee class that keeps data attributes for the following pieces of information: DEmployee name Employee number Next, write a class named
In Phyton, write an Employee class that keeps data attributes for the following pieces of information: DEmployee name Employee number Next, write a class named Production Worker that is a subclass of the Employee class. The Production Worker class should keep data attributes for the following information: O Shift number (an integer, such as 1, 2, or 3) Hourly pay rate In a particular factory, a shift supervisor is a salaried employee who supervises ashift. In addition to a salary, the shift supervisor earns a yearly bonus when his or hershift meets production goals. Write a Shift Supervisor class that is a subclass of the Employee class. The ShiftSupervisor class should keep data attributes for the following information: Annual salary Annual production bonus The workday is divided into two shifts: day and night. The shift attribute will holdan integer value representing the shift that the employee works. The day shift is shift land the night shift is shift 2. Write the appropriate accessor and mutator methods foreach class. Once you have written the classes, write a program that creates an object of the Production Worker class, an object of the ShiftSupervisor #class and prompts the user to enter data for each of the object's data attributes. Store the data in the objects, thenuse the objects' accessor methods to retrieve them and display them on the screen
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
