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:Name Susan Meyers Mark Jones Joy Rogers ID Number 47899 39119 81774 Department Accounting IT Manufacturing

The program should store this data in the three objects, then display the data for each employee on the screen.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: