Question: PYTHON CODE NEEDED PLEASE Write a program that displays the weekly payroll for a company that hires both salaried and hourly employees. The program must:

PYTHON CODE NEEDED PLEASE

Write a program that displays the weekly payroll for a company that hires both salaried and hourly employees.

The program must:

- Contain a class named Employee having two subclasses named SalariedEmployee and HourlyEmployee.

- The Employee class should have instance variables for name, the 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.

- Before entering the Payroll program, ask the user to enter a password. If the password is correct grant access, if not asked to try again the password.

After the data for all of the employees is entered, the program should display:

- the weeks pay for each employee,

- the number of employees,

- the number of salaried employees,

- the number of hourly 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!