Starting Out with Python plus MyProgrammingLab with Pearson eText -- Access Card Package (3rd Edition)
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 10, Problem 6PE

Employee Management System

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.

Blurred answer
Students have asked these similar questions
Write a class named Library. A library has the following attributes:• name: the name of this library.• employees: a list of LibraryEmployees that work at the library.• books: a dictionary that contains Books as keys. The value paired with each key is either anempty string, or a string representing the name of a person who has checked out the Book.The Library class should have an initializer that MAY accept employees and books as arguments,but doesn’t have to do so. If provided, these values should be assigned to the object’srespective attributes. If not provided, employees and books should begin as an empty list anddictionary, respectively. The value for the name attribute is always provided.The class should also have the following methods:• hire_employee(): takes in a new LibraryEmployee, and adds it to this library’s list ofemployees.• add_book(): takes in a new Book, and adds it to this library’s books (unless the libraryalready has this book). If the library already has the book,…
(Querying an Array of Invoice Objects) Use the class Invoice provided in the lab assignment to create an array of Invoice objects.Class Invoice includes four properties—a PartNumber (type int), a PartDescription (type string), a Quantity of the item being purchased (type int) and a Price (type decimal).Write a console application that performs the following queries on the array of Invoice objects and displays the results:a) Use LINQ to sort the Invoice objects by PartDescription.b) Use LINQ to sort the Invoice objects by Price.c) Use LINQ to select the PartDescription and Quantity and sort the results by Quantity.d) Use LINQ to select from each Invoice the PartDescription and the value of the Invoice(i.e., Quantity * Price). Name the calculated column InvoiceTotal. Order the results by Invoice value. [Hint: Use let to store the result of Quantity * Price in a new range variable total.]e) Using the results of the LINQ query in Part d, select the InvoiceTotals in the range$200 to…
*python coding please This exercise assumes that you have created the Employee class for Programming Question 1.Create a program that stores Employee objects in a dictionary. Use the employee ID numberas 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 programWhen the program ends, it should pickle the dictionary and save it to a file. Each time theprogram starts, it should try to load the pickled dictionary from the file. If the file does notexist, the program should start with an empty dictionary

Chapter 10 Solutions

Starting Out with Python plus MyProgrammingLab with Pearson eText -- Access Card Package (3rd Edition)

Ch. 10.4 - What is an object?Ch. 10.4 - Prob. 2CPCh. 10.4 - Why is an object's internal data usually hidden...Ch. 10.4 - What are public methods? What are private methods?Ch. 10.4 - Prob. 15CPCh. 10.4 - Prob. 16CPCh. 10.4 - When designing an object-oriented application, who...Ch. 10.4 - How do you identify the potential classes in a...Ch. 10.4 - What are a classs responsibilities?Ch. 10.4 - What two question should you ask to determine a...Ch. 10.4 - Will all of a class's action always be directly...Ch. 10 - The _______ programming practice is centered on...Ch. 10 - The ___________ programming practice is centered...Ch. 10 - A(n) _____ is a component of a class that...Ch. 10 - Prob. 4MCCh. 10 - By doing this, you can hide a classs attribute...Ch. 10 - Prob. 6MCCh. 10 - A(n) ________ method stores a value in a data...Ch. 10 - Prob. 8MCCh. 10 - If a class has a method named _ _str_ _ , which of...Ch. 10 - A set of standard diagrams for graphically...Ch. 10 - In one approach to identifying the classes in a...Ch. 10 - Prob. 12MCCh. 10 - The practice of procedural programming is centered...Ch. 10 - Object reusability has been a factor in the...Ch. 10 - It is a common practice in object-oriented...Ch. 10 - Prob. 4TFCh. 10 - Starting an attribute name with two underscores...Ch. 10 - You cannot directly call the _ _ str _ _ method.Ch. 10 - One way to find the classes needed for an...Ch. 10 - Prob. 1SACh. 10 - Why should an object's data attributes be hidden...Ch. 10 - What is the difference between a class and an...Ch. 10 - The following statement calls an object's method....Ch. 10 - Prob. 5SACh. 10 - In a Python class, how do you hide an attribute...Ch. 10 - Prob. 7SACh. 10 - Suppose my_car is the name of a variable that...Ch. 10 - Prob. 2AWCh. 10 - Look at the following description of a problem...Ch. 10 - Pet Class The Pet class Write a class named Pet,...Ch. 10 - Car Class Write a class named Car that has the...Ch. 10 - Personal Information Class Design a class that...Ch. 10 - Employee Class Write a class named Employee that...Ch. 10 - RetailItem Class Write a class named RetailItem...Ch. 10 - Employee Management System This exercise assumes...Ch. 10 - Cash Register This exercise assumes you have...Ch. 10 - Trivia Game In this programming exercise, you will...

Additional Engineering Textbook Solutions

Find more solutions based on key concepts
In some languages you must use a library function to raise a number to a power.

Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)

Under what circumstances does Java automatically provide a default constructor for a class?

Starting Out with Java: From Control Structures through Data Structures (4th Edition) (What's New in Computer Science)

Knowledge Booster
Background pattern image
Computer Science
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
  • Text book image
    EBK JAVA PROGRAMMING
    Computer Science
    ISBN:9781337671385
    Author:FARRELL
    Publisher:CENGAGE LEARNING - CONSIGNMENT
    Text book image
    Microsoft Visual C#
    Computer Science
    ISBN:9781337102100
    Author:Joyce, Farrell.
    Publisher:Cengage Learning,
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
9.1: What is an Array? - Processing Tutorial; Author: The Coding Train;https://www.youtube.com/watch?v=NptnmWvkbTw;License: Standard Youtube License