Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The owners of the Annan Supermarket would like to have a program that computes the monthly gross pay of their non - exempt hourly employees.
The owners of the Annan Supermarket would like to have a program that computes the
monthly gross pay of their nonexempt hourly employees. The user will enter an
employees first name, last name, the hourly rate of pay, and the number of hours worked
for the month, by the week. Assume there are weeks in a month. In addition, Annan
Supermarkets would like the program to compute the employees net pay and overtime
pay. Overtime hours, any hours over are paid at the regular hourly rate. Net
pay is gross pay minus taxes Refer to the tax table on the second page
Define a class called Employee in a file named EmployeeClass.py The class must have
private attributes to store the employee's name, hourly rate, the total hours worked, the
total regular hours worked sum of hours and the total overtime hours worked sum
of hours
The class must also have methods to perform the following tasks:
A constructor the initializer method to initialize the hourly rate to the minimum
wage of $ per hour and the hours worked regular and overtime to
A method to get a settermutator method
the employee's name
the hourly rate
the hours work for the month by the week assume weeks in a month
Do not write separate setters for regular and overtime hours. Use a whilefor
loop that iterates four times to read the hours worked from the user and call the
setter method four times. Do not use a list to ead the hours worked. The
header of the method should look like this:
def setHoursWorkedself hoursWorked:
A method to return a getteraccessor method
the employee's name
the hourly rate
the total regular hours work for the month
the total overtime hours for the month
A method to return a getteraccessor method
the monthly regular pay
A method to return a getteraccessor method
the monthly overtime pay.
A method to calculate the gross pay and the net pay.
An str method to display the output which must include the following
information:
Employee's name
Total regular hours worked
Total overtime hours worked
Total hours worked
Pay rate
Monthly Regular Pay
Monthly overtime pay
Monthly gross pay
Monthly taxes
Monthly net pay
The str method must not contain any print statements and must return a string.
Write a set of functions, including main, in a file named Programpy that declares an
object of the class defined in the EmployeeClass.py file and test the methods written for
Tax Table
If the gross
Bracket pay is over But not over Tax
$ $
$ $
$ $
$ $
$ $
$ $
$ NA
Run Run
Name: John Doe Name: Jane Doe
Hourly rate: $ Hourly rate: $
Hours worked: Hours worked:
Run Run
Name: John King Name: kunle dood
Hourly rate: $ Hourly rate: $
Hours worked: Hours worked:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started