Python Programming: An Introduction to Computer Science
Python Programming: An Introduction to Computer Science
3rd Edition
ISBN: 9781590282779
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
Please answer the JAVA OOP questions below: How do arrays of objects differ from arrays of primitive types? Why and when would you use an array of objects? What are the different ways to initialize an array of objects? What is a static variable in Java?  How does its scope differ from instance variables? When should you use static variables?  Provide examples where static variables are beneficial over instance variables. What is the difference between static and non-static methods in the Data Definition Class?  What are the benefits of using static methods?
Assume you are a loyal member of Costco. You have been expecting your membership reward from the company, and you just received a text message on your mobile phone. The message appears to be from Costco: Costco - Your 3% return is ready: costco.wholesaledividend.com Before clicking the link in the message, you consider whether this is genuinely from Costco or a phishing attack on you. How can you tell? If it is a phishing attack, what mechanism was most likely used to send the message to you? What actions can you take if you are not sure whether it is a genuine message from Costco? What actions can you take if you are sure this is a phishing attack?
RSA and Diffie-Hellman are important algorithms in public-key cryptography. What are the differences between the two? Assume you intercept the ciphertext C = 105 sent to a user whose public key is e = 7, n = 403. Explain in detail how you will find the private key of the user and crack the ciphertext. What is the plaintext M?
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
Text book image
MIS
Computer Science
ISBN:9781337681919
Author:BIDGOLI
Publisher:Cengage
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