Payroll class (name, hours, pay, total)

The details are this, I need to make this class. It only says to make one class, Payroll. I should only be making what is stated.

Payroll class
The payroll class contains the following attributes:
Employee data containing many employees each made up of the following:
• employee name: string
• hours worked: float
• pay rate: float
• Total pay: float
The Payroll class has the following methods:
readData()
Reads a file of employee data (one employee / per line) with each line consisting of the following
fields with some type of delimiter between them. The data from the file is stored in the Payroll’s
attributes.
• name,
• hours,
• pay rate for each employee
The file may not exist the first time or it may exist and have data. Close the file after reading the
information into lists. Handle both cases.
Hint: You may use the split string function to break a line into name, hours, and pay rate.
writeData()
Writes the employee data in the Payroll’s attributes into a file listing each employee on a single
line with a delimiter between each field.
inputData()
The inputData method uses the classes attributes to store data. It has a loop, inside the loop are
statements to get the following data from the user:
• employee name – string
• hours worked – float
• pay rate – float
The loop repeats to read multiple employee information until a user indicates they no longer wish to
enter data.
Error checking is required to check the data to insure it does not corrupt the list(s).
computePay()
The computePay() method calculates the gross amount to be paid to each employee and save the
amount in the classes attributes:
a) For the first 40 hours, the rate is the given rate;
b) For hours over 40, the rate is 1.5 times the given rate
displayPay()
The method loops through the classes attributes to display a table in the following format:
DOODAD MANUFACTURING COMPANY JUNE PAYROLL
EMPLOYEE NAME HOURS WORKED PAY RATE GROSS PAY

Here is what I have, and I know it is wrong, but I am just lost. This is the last project of the class, and I am just so confused.

#payroll class
class payroll:

def __init__(self):
    self.name = name 
    self.hours = hours
    self.pay = pay
    self.total = total

#set attributes
def set_name(self, name):
self.name = name

def set_hours(self, hours):
    self.hours = hours

def set_pay(self, pay):
    self.pay = pay

def set_total(self, hours, pay):
    self.total = hours * pay

#return the attributes
def set_name(self, name):
return self.name

def set_hours(self):
    return self.hours

def set_pay(self):
    return self.pay

def set_total(self):
    return self.total

New contributor

zimmy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật