Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(4) Change an existing contact record. e marks] If the third option of the menu ie, Change an existing contact, is selected, the program should

image text in transcribed

(4) Change an existing contact record. e marks] If the third option of the menu ie, "Change an existing contact, is selected, the program should allow the user to update the phone mumber and email address of a known contact in the phone book Its exact layout should have the same format as shown below -- A Phone Book Management Program by abcd001 -- 1. Look up a contact 2. Add a new contact COMPSCI 105 S2 C-Assignment One 6 of 13 3. Change an existing contact 4. Delete a contact 5. Display all contacts 6. Quit the program Enter your choice: 3 Search the name: Kelly Update phone number: 1234567 Update email address: kellyjmail.com 1. Look up a contact 2. Add a new contact 3. Change an existing contact 4. Delete a contact 5. Display all contacts 6. Quit the program Enter your choice: 3 Search the name: Grace Grace is not found in the phone book. 1. Look up a contact 2. Add a new contact 3. Change an existing contact 4. Delete a contact 5. Display all contacts 6. Quit the program Enter your choice: To achieve the abore task, you should implement the update a_record) method in the PhoneBook class. The update_a_record (self)fulfills the function of changing an existing contact record with user input The function requests for a user input name, then it makes use of the find_a_record () to determine whether the input name already exists in the phone book or not. If a matching name is found, it will further asking input for the new phone umber and email address, then change the corresponding Contact object in the phone book prints out the error message. The sample imput output are shown in the abore example. if the input name does not exists in the phone book, it

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application Development And Administration

Authors: Michael V. Mannino

3rd Edition

0071107010, 978-0071107013

More Books

Students also viewed these Databases questions