Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

WRITE C++ SHOW CODE Contacts List Assignment We are going to write a program that mimics a simple contact list. The list will hold a

WRITE C++ SHOW CODE

Contacts List Assignment We are going to write a program that mimics a simple contact list. The list will hold a name and a phone number. The program will be menu driven and will allow any number of contact items to be added or removed from the list.

The menu should allow the user to 1) add a contact, 2) delete a contact, 3) display a list of all the contacts and 4) exit the program.

Create a class called NodeClass.

This will be a node to hold the name, phone number and pointer of an individual contact.

Make all the members public to make our lives easier.

The only thing in the node class is two string variables and a pointer variable to another NodeClass item.

You only need a constructor that receives these items and sets them. The constructor should also set the pointer to nullptr. Create another class called ListClass. The list class will handle adding a node, deleting a node and printing the list. It should have those member methods and a headNode variable that points to a NodeClass object

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions