In this program there are custom Node, List, and Iterator classes. The Node class has downsize, maximum, and sort friend functions. It has a deference operator and Node pointers to the next and previous nodes. The Iterator class is designed to go through a linked list and deference the node values. It has several overloaded operators and friend functions. Private variables are List and Node pointers. The List class is a list class with several functions (reverse, swap, merge, insert and erase) for modifying the list. Private member variables are pointers to the beginning and the end of the list, and an unsigned int for the size of the list. The main function creates a list of user input values, displays them, and then allow the user to insert values at chosen indexes. It displays this new list, its maximum, and its size. Then it removes every second value from the new list, displays that update, sorts it from least to greatest, then from greatest to least, and then merges it with another list, displaying the list after each modification.
connorvhennen / nodelistiterator Goto Github PK
View Code? Open in Web Editor NEWIn this program there are custom Node, List, and Iterator classes. The Node class has downsize, maximum, and sort friend functions. It has a deference operator and Node pointers to the next and previous nodes. The Iterator class is designed to go through a linked list and deference the node values. It has several overloaded operators and friend functions. Private variables are List and Node pointers. The List class is a list class with several functions (reverse, swap, merge, insert and erase) for modifying the list. Private member variables are pointers to the beginning and the end of the list, and an unsigned int for the size of the list. The main function creates a list of user input values, displays them, and then allow the user to insert values at chosen indexes. It displays this new list, its maximum, and its size. Then it removes every second value from the new list, displays that update, sorts it from least to greatest, then from greatest to least, and then merges it with another list, displaying the list after each modification.