[SOLVED] CECS275 Project 3-Rolodex

25.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Project_3-3jx5ds.zip (64.1 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
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. Display
a. 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 Contact
2. Remove Contact
3. Search for Contact
4. Modify Contact
5. Display Contacts
6. Quit
1
Add Menu:
Enter First Name: Bart
Enter Last Name: Simpson
Enter Phone #: 555-1212
Enter Address:
742 Evergreen Terrace
Enter City: Springfield
Enter Zip-Code: 12345
Enter State: IL
Rolodex Menu:
1. Add Contact
2. Remove Contact
3. Search for Contact
4. Modify Contact
5. Display Contacts
6. Quit
3
Search Menu:
A. Search by Full Name
B. Search by Last Name
C. Search by Zip-Code
B
Enter Last Name: Simpson
1. Bart Simpson
   555-1212
   742 Evergreen Terrace
   Springfield 12345 IL
2. Homer Simpson

555-1212

Rolodex Menu:
1. Add Contact
2. Remove Contact
3. Search for Contact
4. Modify Contact
5. Display Contacts
6. Quit
4
Enter First Name: Herman
Enter Last Name: Munster
Herman Munster
131-1313
Update Menu:
A. Enter First Name
B. Enter Last Name
C. Enter Phone Number
D. Enter Address
E. Enter City
F. Enter Zip-Code
G. Enter State
Q. Save and Quit
D
Enter Address:
1313 Mockingbird Lane
Modify Menu:
A. Enter First Name
B. Enter Last Name
C. Enter Phone Number
D. Enter Address
E. Enter City
F. Enter Zip-Code
G. Enter State
Q. Save and Quit
Q

Saving…

Rolodex Menu:
1. Add Contact
2. Remove Contact
3. Search for Contact
4. Modify Contact
5. Display Contacts
6. Quit
6

Quitting…

  • Project_3-3jx5ds.zip