Question: USING C++ Objective: Implement an application that uses linked lists. To be completed by a group of 3 people. Assignment: This is a group assignment.
USING C++
Objective:
Implement an application that uses linked lists. To be completed by a group of 3 people.
Assignment:
This is a group assignment. You can keep the same group that you had for Lab4 or get into a new group. Please use the People link on the navigation menu to find groups. Visit Working in Groups to learn how to join a group.
Detailed Specifications:
Chapter 7 (Gaddis 18) introduces you to linked lists. In this lab assignment you will use the algorithms presented in this chapter to implement a phone book that keeps a list of names with respective phone numbers. The contacts should be kept in alphabetical order by their last name, then first name. No repetitions are allowed.
You will adapt the Linked List Operations presented on Chapter 7 to work with a list of names and phone numbers. The header file is provided here: Contact.h
Please note that list abstract data type on the zyBook has two pointers: head and tail. You only need head.
The class that implements the phone book must have the following member functions:
- Constructor: should initialize the head to null.
- Destructor: should clean up the list. Note that this method must follow the algorithm that eliminates one node at a time. If you just set head to null, you create a memory leak in your program.
- Insert: must create a new node (with the name and phone number passed as parameters) and insert it in the list keeping it in alphabetical order.
- Delete: receives the name as a parameter, looks for the node that matches the name and removes it from the list.
- Print: traverses the list printing each contact (name and phone number)
The following is a fair breakdown of the work needed to complete this lab in a group of 3 people:
- Person 1: This is the group leader and the person who will turn in all files, implements the main function that instantiates the phone book object, develops the appropriate logic to interface with the user asking for names to be inserted/deleted and calls the appropriate methods. Makes sure all files compile when put together. Test and attach the output as a comment at the end of main.
- Person 2: implements the insert and delete methods. Includes appropriate documentation of the function.
- Person 3: implements constructor, destructor and print (traverse). Includes appropriate documentation of the function.
How to split the workload:
Turn in:
contactlist.cpp (with implementation of all member functions) and main.cpp (with the logic of the phone book operations). It is your responsibility to make sure the program compiles when all parts are put together. I won't grade your lab if I can't compile and test it.
The group leader is responsible for turning in all files when done.
Output:
Take a screen shot of the testing you did. Insert at least 3 contacts, printing in between, remove each one of them, printing in between.
Documentation:
Follow lab documentation guidelines in all files. List all group members and explain who was responsible for what in the header comment at the beginning of all source files.
Grading:
There is a peer evaluation instead of peer review for this lab that is worth 5 points. Your grade on the peer evaluation will be determined by the average of the grades you received from your teammates on your participation.
I am person 1 so I just need to
1) to instantiate the class and test the different methods given to me
you have to import the files given to me by my peers for the class
2)Then test the different methods: Constructor, destructor, insert method, delete method, print method
This is what I have done until now
I am person 1.....
and that's what I have
#include
#include
using namespace std;
int main(){
bool comparative = true; string firstName;
string lastName; string tel;
while(comparative == true ){ cout<< "Please enter First Name: "; cin>>firstName; cout< I was trying to ask this using tutoring but is not available anymore here, so I will appreciate some help, Thank you. (using C++)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
