Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ programming language please! Thank you! Using your knowledge of Circular and Doubly-Linked list algorithms, create a new class combining the two into a new

C++ programming language please! Thank you!image text in transcribed

Using your knowledge of Circular and Doubly-Linked list algorithms, create a new class combining the two into a new data structure: a Circular, Doubly-Linked List. Call the class DCList and place it in it's own header file, DCList.h. Your class must implement the methods as described in the above UML diagram. The following methods should be included in your class: constructor- initializes pointers in the class to NULL. destructor- destroys the linked list. clear- destroys the linked list, resetting pointers to NULL. insert-inserts it's argument into the list, maintaining an ascending order. Returns 0 on success, -1 on failure. append- attached it's argument to the end of the list. remove- removes the first node containing it's argument from the list. Returns 0 on success, -1 on failure. isFull-returns true if the list is full, false otherwise. isEmpty - returns true if the list is empty, false otherwise. print - displays the content of the list to the screen on a single line. Each value is separated by a space reverse- displays the content of the list to the screen on a single line, but in reverse order. next-displays the "next" value in the list. It does this by advancing the cur pointer and then assigning the node's value to next's reference parameter. Returns 0 on success, -1 on failure. length-returns the number of nodes in the list

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

Step: 3

blur-text-image

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

Database Processing Fundamentals, Design, and Implementation

Authors: David M. Kroenke, David J. Auer

14th edition

133876705, 9781292107639, 1292107634, 978-0133876703

More Books

Students also viewed these Databases questions

Question

Trudy, when she first saw the bull pawing the ground, ran.

Answered: 1 week ago