Write a python 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 PYTHON program that creates three Employee objects to hold the following data:

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%

Employee Management System


Write a python 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 PYTHON program that creates three Employee objects to hold the following data:

 

Name  ID  Number  Department  Job Title
Susan Meyers  47899  Accounting Vice President
Mark Jones  39119  IT  Programmer
Joy Rogers  81774  Manufacturing  Engineer


The program should store this data in the three objects, then display the data for each employee on the screen.
Using the Employee class, 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
• Print all employees in 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. 

 

Sample Input/Output:


Menu
----------------------------------------
1. Look up an employee
2. Add a new employee
3. Change an existing employee
4. Delete an employee
5. Print all employees
6. Quit the program
Enter your choice: 1
Enter an employee ID number: 47899
Name: Susan Meyers
ID number: 47899
Department: Accounting
Title: Vice President
Menu
----------------------------------------
1. Look up an employee
2. Add a new employee
3. Change an existing employee
4. Delete an employee
5. Print all employees
6. Quit the program
Enter your choice: 6

CH10: Problem 1: Employee Management System
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
ID Number
Department
Job Title
47899
Accounting
Vice President
Programmer
Engineer
The program should store this data in the three objects, then display the data for each employee
Mark Jones
Joy Rogers
39119
IT
81774
Manufacturing
on the screen.
Using the Employee class, 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
Page 1 of 3
• Print all employees in 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.
Sample Input/Output:
Menu
1. Look up an employee
2. Add a new employee
3. Change an existing employee
4. Delete an employee
5. Print all employees
6. Quit the program
Enter your choice: 1
Enter an employee ID number: 47899
Name: Susan Meyers
ID number: 47899
Department : Accounting
Title: Vice President
Menu
1. Look up an employee
2. Add a new employee
3. Change an existing employee
4. Delete an employee
5. Print all employees
6. Quit the program
Enter your choice: 6
Transcribed Image Text:CH10: Problem 1: Employee Management System 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 ID Number Department Job Title 47899 Accounting Vice President Programmer Engineer The program should store this data in the three objects, then display the data for each employee Mark Jones Joy Rogers 39119 IT 81774 Manufacturing on the screen. Using the Employee class, 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 Page 1 of 3 • Print all employees in 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. Sample Input/Output: Menu 1. Look up an employee 2. Add a new employee 3. Change an existing employee 4. Delete an employee 5. Print all employees 6. Quit the program Enter your choice: 1 Enter an employee ID number: 47899 Name: Susan Meyers ID number: 47899 Department : Accounting Title: Vice President Menu 1. Look up an employee 2. Add a new employee 3. Change an existing employee 4. Delete an employee 5. Print all employees 6. Quit the program Enter your choice: 6
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Knowledge Booster
Data members
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education