Question: Write a Python class Employee with attributes like emp _ id , emp _ name, emp _ salary, and emp _ department and methods like
Write a Python class Employee with attributes like empid empname, empsalary, and empdepartment and methods like calculateempsalary, empassigndepartment, and printemployeedetails.
Sample Employee Data:
"ADAMS", E "ACCOUNTING"
"JONES", E "RESEARCH"
"MARTIN", E "SALES"
"SMITH", E "OPERATIONS"
This data must read from excel file
After calculate, data must be updated in the excel file
Use 'assigndepartment' method to change the department of an employee.
Use 'printemployeedetails' method to print the details of an employee.
Use 'calculateempsalary' method takes two arguments: salary and hoursworked, which is the number of hours worked by the employee. If the number of hours worked is more than the method computes overtime and adds it to the salary. Overtime is calculated as following formula:
overtime hoursworked
Overtime amount overtime salary
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
