Python Programming: An Introduction to Computer Science, 3rd Ed.
Python Programming: An Introduction to Computer Science, 3rd Ed.
3rd Edition
ISBN: 9781590282755
Author: John Zelle
Publisher: Franklin, Beedle & Associates
bartleby

Videos

Question
Book Icon
Chapter 12, Problem 3PE
Program Plan Intro

Tracking conference attendees

Program plan:

  • Import the package.
  • Create a class “Conference_Manager”,
    • Define the “_init_()” function,
      • Create empty list.
      • Open the input file in read mode.
      • Read all the characters from the file using “read()”.
      • Parse the json string using “json_loads()”.
      • Create a “for” loop to iterate all the keys which are obtained from “json_object”.
        • Assign initial values by invoking “_init_()”.
        • Append the value at the end of the list.
      • Close the input file.
    • Define the getter method “get_JSON()”,
      • Return the key, value pairs get from “json_object”.
    • Define the getter method “get_Attendee()”,
      • Create “for” loop to iterate over elements of list.
        • Check whether the value return from “get_Name()” is equal to the value stored in “name,
          • Return the list.
    • Define the getter method “find_ByState()”,
      • Create a list.
      • Create “for” loop to iterate over elements of list.
        • Check whether the value return from “get_State()” is equal to the value stored in “state”,
          • If it is true, append the value to the end of the list.
      • Return the list.
    • Define the getter method “make_Attendee()”,
      • Assign the value to the list return from “_init_ ()” method from Attendee class.
      • Append the value to the end of the list.
    • Define the method “del_Attendee()”,
      • Create for loop,
        • Check whether the name is return from “get_name()”,
          • If it is true, remove the element using “pop()”.
    • Define the method “update_Conference()”,
      • Create a list.
      • Create for loop,
        • Check whether the name is return from “get_name()”,
          • Append the value to the end of the list.
            • Open the output file in write mode,
              • Serialize the object as a JSON formatted stream using “json_dump()”.
  • Create a class “Attendee”,
    • Define the function “_init_()”,
      • Assign the initial values for the variables.
    • Define the getter method “get_Name()” to return the value stored in “name”.
    • Define the getter method “get_Company()” to return the value stored in “company”.
    • Define the getter method “get_State()” to return the value stored in “state”.
    • Define the getter method “get_Email()” to return the value stored in “email”.
    • Define the method “display_Info()” to print the formatted output.
  • Define the “main()” function,
    • Call the constructor to initialize the values.
    • Call “make_Attendee()” function.
    • Assign the value return from “get_Attendee()”.
    • Assign the value return from “find_ByState()”.
    • Print the value return from “get_Company()”.
    • Print the value return from “get_Name()”.
    • Print the value return from “get_Sate()”.
    • Print the value return from “get_Email()”.
    • Call the function “display_Info()”.
    • Create for loop,
      • Print the value return from “get_Name()”.
  • Call the “main()” function.

Blurred answer
Students have asked these similar questions
Of the five primary components of an information system (hardware, software, data, people, process), which do you think is the most important to the success of a business organization? Part A - Define each primary component of the information system. Part B - Include your perspective on why your selection is most important. Part C - Provide an example from your personal experience to support your answer.
Management Information Systems
Q2/find the transfer function C/R for the system shown in the figure Re ད
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
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Files & File Systems: Crash Course Computer Science #20; Author: CrashCourse;https://www.youtube.com/watch?v=KN8YgJnShPM;License: Standard YouTube License, CC-BY
UNIX Programming (Part - 10) The File System (Directories and Files Names); Author: ITUTEES;https://www.youtube.com/watch?v=K35faWBhzrw;License: Standard Youtube License