Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Lab * : Doubly - Linked Lists ( Park ) - Templates Sorted Circular Doubly - Linked List ADT with Sentinel Node Convert the previous
Lab: DoublyLinked Lists Park Templates
Sorted Circular DoublyLinked List ADT with Sentinel Node
Convert the previous lab's ListNode and LinkedList classes to template classes.
Note: Converting the StackQueue classes to template classes was an easy task because display and search are not valid StackQueue 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
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