C++ Programming Requirments: Please submit just one file for the classes and main to test the classes. Just create the classes before main and submit only one cpp file. Do not create separate header files. Please note: the deleteNode needs to initialize the *nodePtr and the *previousNode. The code to do this can be copied from here: ListNode *nodePtr, *previousNode = nullptr; Part 1: Your own Linked List Design your own linked list class to hold a series of integers. The class should have member functions for appending, inserting, and deleting nodes. Don't forget to add a destructor that destroys the list. Demonstrate the class with a driver program. Part 2: List Print Modify the linked list class you created in part 1 to add a print member function. The function should display all the values in the linked list. Test the class by starting with an empty list, adding some elements, and then printing the resulting list out.
C++
Requirments:
Please submit just one file for the classes and main to test the classes. Just create the classes before main and submit only one cpp file. Do not create separate header files.
Please note: the deleteNode needs to initialize the *nodePtr and the *previousNode. The code to do this can be copied from here:
ListNode *nodePtr, *previousNode = nullptr;
Part 1: Your own Linked List
Design your own linked list class to hold a series of integers. The class should have member functions for appending, inserting, and deleting nodes. Don't forget to add a destructor that destroys the list. Demonstrate the class with a driver program.
Part 2: List Print
Modify the linked list class you created in part 1 to add a print member function. The function should display all the values in the linked list. Test the class by starting with an empty list, adding some elements, and then printing the resulting list out.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 7 images