Question: Please write this code using latest version of python. Payroll: Write a program that displays the weekly payroll for a company that hires both salaried

Please write this code using latest version of python.

Payroll: Write a program that displays the weekly payroll for a company that hires both salaried and hourly employees. The program should contain a class named Employee having two subclasses named SalariedEmployee and HourlyEmployee. The Employee class should have instance variables for name, rate of pay, and hours worked. (The rate of pay should be a fixed amount for salaried employees and the hourly wage for hourly employees.) Each subclass should have a calculatePay method. After the data for all of the employees has been entered, the program should display the week's pay for each employee, the number of employees, the number of salaried employees, the total payroll, and the average number of hours worked by the employees.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!