Contents

Instructions

In this lab, you will work with a partner to create a digital Rolodex. Your program should use arrays or vectors to keep track of the following information about contacts:

The program should ask the user to select one of four options:

The "add a contact" option should cause the program to prompt the user to enter the new contact's information (see above). The "find a contact" option should prompt the user for the last name of the contact and print out that contact's information if the last name is found, or "Contact not found" otherwise. The "list all contacts" option should list all of the contacts that have been added. The program should keep re-running until the user selects the "quit" option.

Hint 1: it may be helpful to use parallel arrays/vectors, one for each piece of information.

Hint 2: if you make an array really big, you don't have to fill it up and you also don't have to worry about running out of space if you're only expecting users to enter a handful of contacts. On the other hand, vectors can be easily expanded.

Extra credit 1 (1 points)

Add an option to update an existing contact.

Extra credit 2 (2 points)

Allow finding users on fields other than last name.

Extra credit 3 (2 points)

Add an option to delete a contact.

Extra credit 4 (2 points)

Store the contacts information to a file and load that information when the program starts up (you can ask a user for a filename or used a fixed filename).

Submission

Submit your .cpp files to here. You can view the rubric here.

(Back to top)