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:

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter11: Inheritance And Composition
Section: Chapter Questions
Problem 5PE: Using classes, design an online address book to keep track of the names, addresses, phone numbers,...
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
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT