[Solved] CECS275 Project 3-Rolodex

30 $

SKU: [Solved] CECS275 Project 3-Rolodex Category: Tag:

5/5 – (1 vote)

Create a class that represents a Contact (.h and .cpp). A Contact has a first name, last name, phone number, address, city, zip, and state, all stored as private strings. Make a constructor and get and set methods to change the Contact’s information. Overload the < (compare by last name, then first name), == (first and last name), <<, and >> operators.

Use the Linked List class (.h and .cpp) given in lecture (normal or recursive). Modify the Node to store a Contact. Methods of the Linked List class should include: get, set, size, isEmpty, add (to end), remove (by last name, first name), remove (by index), sort, search (by last name, returns list of matches), search (by zip code, returns list of matches), search (by first and last name, returns a Contact). and an overloaded << operator to display an enumerated list of Contacts in sorted order (by last name then first name).

In your main, create a Linked List and initially populate it with Contacts read in from the file ‘addresses.txt’. Allow the user to add, remove, search, modify, and display the list. When the user quits, write the updated list back to the file in the same format.

Create functions and menu options to:

  1. Add
    1. add a Contact to the end of the list. Use the overloaded >> to input.
    2. ask the user enter the first and last name, then allow the user to input anyother information they have. If they do not enter a value for a particular field, store an empty string (check that a first and last name was entered).
  2. Remove
    1. by first and last name – if found, then remove the Contact from the list.
    2. by index in the list – display the enumerated list (1 based), get the user’schoice, then remove the Contact at that location.
  3. Search
    1. last name – display all information for each Contact with that last name.
    2. first and last name – display all of information for the matching Contact.
    3. zip-code – display all information for each Contact’s with that zip code.
  4. Update

a. prompt the user to enter the Contact’s full name. Then prompt the user to

enter which part of the Contact they’d like up update. Take in the updated information, and update the Contact’s data.

5. Displaya. display an enumerated list of all contacts alphabetically by last name, and

then first name.6. Quit – write back to the file when the user is finished.

Notes:

  1. Document all classes, methods, and functions (@params and @returns).
  2. You should have at least 5 files (.h’s and .cpp’s)
  3. Check all user input.
  4. Read and write to the same file. Write back in the same format.

Example Output:

Rolodex Menu:1. Add Contact2. Remove Contact3. Search for Contact4. Modify Contact5. Display Contacts6. Quit1
Add Menu:Enter First Name: BartEnter Last Name: SimpsonEnter Phone #: 555-1212Enter Address:742 Evergreen TerraceEnter City: SpringfieldEnter Zip-Code: 12345Enter State: IL
Rolodex Menu:1. Add Contact2. Remove Contact3. Search for Contact4. Modify Contact5. Display Contacts6. Quit3
Search Menu:A. Search by Full NameB. Search by Last NameC. Search by Zip-CodeB
Enter Last Name: Simpson
1. Bart Simpson   555-1212
   742 Evergreen Terrace
   Springfield 12345 IL2. Homer Simpson

555-1212

Rolodex Menu:1. Add Contact2. Remove Contact3. Search for Contact
4. Modify Contact5. Display Contacts6. Quit4
Enter First Name: HermanEnter Last Name: Munster
Herman Munster131-1313
Update Menu:A. Enter First NameB. Enter Last NameC. Enter Phone NumberD. Enter AddressE. Enter CityF. Enter Zip-CodeG. Enter StateQ. Save and QuitD
Enter Address:1313 Mockingbird Lane
Modify Menu:A. Enter First NameB. Enter Last NameC. Enter Phone NumberD. Enter AddressE. Enter CityF. Enter Zip-CodeG. Enter StateQ. Save and QuitQ

Saving…

Rolodex Menu:1. Add Contact2. Remove Contact3. Search for Contact4. Modify Contact5. Display Contacts6. Quit6

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CECS275 Project 3-Rolodex
30 $