Question: Employee data a)Write a Python class called Employee that maintains some employee data: employee ID, employeename, employee worked hours and employee pay rate. Pay rate

  1. Employee data

a)Write a Python class called Employee that maintains some employee data: employee ID, employeename, employee worked hours and employee

pay rate. Pay rate values and worked hours are a float number with two decimal points. You need to create accessors methods for employee ID, employee name, employee worked hours and employee pay rate. Do not create any mutators methods for this question. b) Create a method get_

total_pay that calculates and returns the total pay of a n employee. Total pay = worked hours * pay rate

c) Create an __str__ method representing a n employee data in this format: Name: Thair Dalain, Worked hours: 30, Pay rate: $100, Total pay: $300

d) In your main() function, instantiate the employee class for two different employees with some dummy data and print out those instances using print() calls.

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 Programming Questions!