Question: Lab * : Doubly - Linked Lists ( Park ) - Templates Sorted Circular Doubly - Linked List ADT with Sentinel Node Convert the previous

Lab*: Doubly-Linked Lists (Park)- Templates
Sorted Circular Doubly-Linked List ADT with Sentinel Node
Convert the previous lab's ListNode and LinkedList classes to template classes.
Note: Converting the Stack/Queue classes to template classes was an easy task because display and search are not valid Stack/Queue operations, therefore it could be done without overloading any operators. Converting a LinkedList class to a template class is more challenging because in order to make display list work with any data type, we have to overload the stream insertion operator. In order to be able to compare objects (in insert, delete, search) we have to overload the relational operators.
In this assignment there are three classes: Park, ListNodeADT, and LinkedListADT.
Download and review the following files:
Park.h
Park.cpp
ListNodeADT.h
LinkedListADT.h
main.cpp
Requirements:
In Park.h and Park.cpp:
replace hDdisplay() with the overloaded stream insertion operator and use it in displayListForw() and displayListBack()
overload the relational operators: <,>,==, etc. Use them in insertNode(), deleteNode(), and searchList()
In ListNodeADT.h define setters and getters
In LinkedListADT.h review insertNode() and displayListForw(), then finish writing:
deleteNode()
searchList()
displayListBack()
In main.cpp - most of the code is given; you have to finish writing three manager functions:
deleteManager()
searchManager()
displayManager()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!