Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This weeks lab involves building a program that manages a small address book. Your program should utilize four lists to manage that address book: first

This weeks lab involves building a program that manages a small address book. Your program should utilize four lists to manage that address book: first names, last names, phone numbers, and addresses. The lists should be parallel -- meaning, the matching index on each list makes up one record. So, index 0 on first names, last names, phone numbers, and addresses is one record, index 1 on each is another, etc. The lists should always be the same length because of this. Your program should have four functions: viewContacts Parameters: the four lists Return values: none Purpose: Display a formatted view of the lists. Each contact should be on the same row. Make sure you display a contact ID. The contact ID should NOT start at 0. addContact Parameters: the four lists Return values: none Purpose: Take in information and add them to the appropriate lists removeContact Parameters: the four lists Return values: none Purpose: Take in an ID and removes the appropriate index from the lists. main Parameters: none Return values: none Purpose: Initialize the lists and run the user menu Your removeContact should utilize try/excepts in some way. The user input should be converted to an integer and then converted to the appropriate index. Also, take in mind, if you try to delete an index that doesnt exist, an error will occur. Your program should not crash. The menu in the main function should include: Exit - exits the loop View Contacts - displays the contacts Add Contact - adds a contact to the lists Remove Contact - displays the contacts and then removes one of the contacts Wrong option - displays an error message if the option chosen isnt a correct option

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

Students also viewed these Databases questions