This exercise assumes you have created the Employee class for Programming Exercise 4. Create a program that
Question:
This exercise assumes you have created the Employee class for Programming Exercise 4. Create a program that stores Employee objects in a dictionary. Use the employee ID number as the key. The program should present a menu that lets the user perform the following actions:
• Look up an employee in the dictionary
• Add a new employee to the dictionary
• Change an existing employee’s name, department, and job title in the dictionary
• Delete an employee from the dictionary
• Quit the program
When the program ends, it should pickle the dictionary and save it to a file. Each time the program starts, it should try to load the pickled dictionary from the file. If the file does not exist, the program should start with an empty dictionary.
Programming Exercise 4
Write a class named Employee that holds the following data about an employee in attributes: name, ID number, department, and job title.
Once you have written the class, write a program that creates three Employee objects to hold the following data:
The program should store this data in the three objects, then display the data for each employee on the screen.
Step by Step Answer: