Please written by computer source Using C++, use a linked list to create an alphabetical Contact Book to store the names, addresses, and phone numbers of our contacts. The data structure used contain contacts should be a linked list and each time a new contact is added the contact will be inserted into the correct alphabetical location by last name. Assume there are no contacts that have the same last name. There will be two classes. One named LinkedList and the other named PersonNode.   The LinkedList class will be used to create a single LinkedList object. - The class will have two PersonNode pointer fields *headPtr that will maintain the head of the linked list *tailPtr that will maintain the tail of the linked list - The class will have the following functions:: *a constructor that initialized the headPtr and tailPtr to NULL *addLink that will take a PersonNode reference or pointer and add the node to the linked list *findInsertSpot that will return a PersonNode pointer that points to the location where a PersonNode is to be inserted into the linked list *getHeadPtr that will return the headPtr

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Please written by computer source

Using C++, use a linked list to create an alphabetical Contact Book to store the names, addresses, and phone numbers of our contacts. The data structure used contain contacts should be a linked list and each time a new contact is added the contact will be inserted into the correct alphabetical location by last name. Assume there are no contacts that have the same last name. There will be two classes. One named LinkedList and the other named PersonNode.

 

The LinkedList class will be used to create a single LinkedList object.

- The class will have two PersonNode pointer fields

*headPtr that will maintain the head of the linked list

*tailPtr that will maintain the tail of the linked list

- The class will have the following functions::

*a constructor that initialized the headPtr and tailPtr to NULL

*addLink that will take a PersonNode reference or pointer and add the node to the linked list

*findInsertSpot that will return a PersonNode pointer that points to the location where a PersonNode is to be inserted into the linked list

*getHeadPtr that will return the headPtr

 

The PersonNode class will be used to create the nodes that are part of the linked list

- The class will have the following fields:

*fName - string contains the contacts first name

*lName - string contains the contact last name

*address - string contains the contacts address

*phone - string contains the contacts phone number

*next - PersonNode pointer that points to the next contact

 

- The class will contain all of the getters and setters for the above named fields (see class diagram below) in addition to

*getFullName - returns the string of lName, fName

*a constructor that takes no arguments and sets next to NULL

*a constructor that takes arguments to set fName, lName, address, and phone and sets next to NULL

 

 

- Finally, create the ability to search for a PersonNode entry from the Contact Book and remove a PersonNode entry from the Contact Book.

- Please include all .cpp, .h, and the main Source.cpp file with main.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Operations of Linked List
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education