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
- 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
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