my python assignment
andy (python assignment)/display.py andy (python assignment)/list.txt1,Apple, Red 2,Banana, yellow 3,Pear, Green 4,Grape, green 5,Strawberry, Red 6,Blackberry, black 7,Blueberry, Blue 8,Orange, Orange andy (python assignment)/python assignment.docx Description of the assessment: This assignment has three tasks. Write an Employee class with the following attributes and methods: Attributes (variables): id, name, department, salary, years of service Methods: addEmpDetails(): to add items in the employee list delEmpDetails(): to delete employee from the list getEmpDetails(): to access the employee details saveEmpDetails_File(): to save the employee information in a .txt file emp_service_years(): to print the IDs and names of employees who worked for 10 years and more. change_dept(): change the employee’s department information if they change the department. The details of the employees are in the following Table 1. In the main function: Add employee information given in Table 1 using addEmpDetails() method. Test the getEmpDetails() method by printing the employee details. Test the emp_service_years method by printing the names and IDs of the employees who worked for 10 years and more. Call the respective method that saves the employee information in a file and check if it has correctly saved all the information in the file. Test the change_dept() method to change any employee’s department (print employee details to confirm this function works). Test the delEmpDetails() method, delete any employee’s details and print it on the screen to verify if this function works or not. Write code that display the details of the employee on the screen using the GraphWin object (You can refer to the files provided (display.py and list.txt) as sample) (5 marks for draft + 10 marks for final work = 15 marks) Table 1: Employee information id name department salary years of service sga59 Susan Gilmore Accounts 80000 6 gai09 Greg...
10 years ago
Purchase the answer to view it
- my_python_assignment_1.txt
- my_python_assignment.docx