Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ Programming Here is the NumberList example from the book: sing the material in the textbook (NumberList) as a sample, design your own dynamic linked
C++ Programming
Here is the NumberList example from the book:
sing the material in the textbook (NumberList) as a sample, design your own dynamic linked list class (using pointers) to hold a series of capital letters. The class should have the following member functions append, insert (at a specific position, return -1 if that position doesn't exist), delete (at a specific position, return -1 if that position doesn't exist), print, reverse (which rearranges the nodes in the list so that their order is reversed), and search (which returns the position of a specific value in the list. Assume the first node is position 0. If the items is not found, then return a -1 which will tell the calling function that that value does not exist) Create a menu-driven program to demonstrate your linked list capabilities 1. Mutator functions which are given a node value that is not a capital letter should have an 2. Mutator functions which are told to access a node that doesn't exist should return a- 1 so that the calling function can handle the problem. (No exit.failure used in this case b/c the calling function can't know if the node is there or not.) If a call to a mutator returns a -1 that will indicate that the node is not found. Display an appropriate error message to the user and then cycle back to the menu again. For example 1. Append 2. Insert 3. Delete 4. Print 5. Reverse 6. Search Please choose a menu option: 2 What value do you wish to insert
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started