Programming Launguage = Python 2. ShiftSupervisor Class 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. Write a ShiftSupervisor class that is a subclass of the Employee class you created in Programming Exercise 1. The ShiftSupervisor class should keep a data attribute for the annual salary and a data attribute for the annual production bonus that a shift supervisor has earned. Demonstrate the class by writing a program that uses a ShiftSupervisor object. Sample Output Enter the name: John Smith Enter the ID number: 234 Enter the annual salary: 100000 Enter the bonus: 10000 Shift supervisor worker information: Name: John Smith ID number: 234 Annual Salary: $100,000.00 Annual Production Bonus: $10,000.00 Combined Annual Pay: $110,000.00 NOTE: Add new calculation.
OOPs
In today's technology-driven world, computer programming skills are in high demand. The object-oriented programming (OOP) approach is very much useful while designing and maintaining software programs. Object-oriented programming (OOP) is a basic programming paradigm that almost every developer has used at some stage in their career.
Constructor
The easiest way to think of a constructor in object-oriented programming (OOP) languages is:
2. ShiftSupervisor Class
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. Write a ShiftSupervisor class that is a subclass of the Employee class you created in Programming Exercise 1. The ShiftSupervisor class should keep a data attribute for the annual salary and a data attribute for the annual production bonus that a shift supervisor has earned. Demonstrate the class by writing a program that uses a ShiftSupervisor object.
Sample Output
Enter the name: John Smith
Enter the ID number: 234
Enter the annual salary: 100000
Enter the bonus: 10000
Shift supervisor worker information:
Name: John Smith
ID number: 234
Annual Salary: $100,000.00
Annual Production Bonus: $10,000.00
Combined Annual Pay: $110,000.00 NOTE: Add new calculation.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images