Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Logidata+ Deductive Databases With Complex Objects Lncs 701

Authors: Paolo Atzeni

1st Edition

354056974X, 978-3540569749

More Books

Students also viewed these Databases questions

Question

Why We Form Relationships Managing Relationship Dynamics?

Answered: 1 week ago