Reference no: EM13161567
Write an employee management system in Python that allows users to add, search, and delete employees. It should store and display five data fields about each employee, which are:
- Name
- Employee ID
- Department
- Title
- Salary
The program should load the data from a specific file ('Employee.csv') at startup and should save the data to the same file before shutdown. The program should display a menu with the following options:
- Add an Employee
- Find an Employee (By Name)
- Find an Employee (By EID)
- Delete an Employee
- Display Statistics
- Display All Employees
- Exit
The data file is a comma separated text values stored in a file with '.CSV' extension. The file has five columns corresponding to employee data fields listed above.
The memory data structure that holds the information is a dictionary with employee names as key and the rest of the fields as a value. The data fields about each employee should also be organized into a dictionary using key/value pairs
Your program will go through the following steps:
a) Load the data file ("Employee.csv") into a dictionary in the memory,
b) Create a loop, display the menu, and interact with the user (each menu option will call the appropriate function corresponding that menu option,
c) Continue displaying the menu (b) until the user selects "Exit" option,
d) Exit and save all the data to the same file ("Employee.csv")
Employee.csv file has the following sample format:
Name |
EmployeeID |
Department |
Title |
Salary |
John Smith |
1000374 |
Marketing |
Director |
90000 |
James Brown |
1000465 |
Engineering |
Manager |
80000 |
Jonathan White |
1000578 |
IT |
Python Programmer |
120000 |
Write a 'load()' function that loads the data at application startup.
- Write the menu system to drive the application (the menu will have the four options described above, but not all options will be functional yet).
- Write necessary code to allow users to add a new employee (menu option 1).
- Write the necessary functions to save the data and exit the application
- For menu options 2 through 6, display a message that those options are not functional yet, and return to the main menu.