Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Your programming task for this assignment is to create a doubly-linked list sorted list (DLSList) that meets the following criteria: i. The list items must

Your programming task for this assignment is to create a doubly-linked list sorted list (DLSList) that meets the following criteria:

i. The list items must be C++ strings rather than ints. For full credit you cannot use char[] arrays, and you must use compare for all string comparisons (rather than the standard relational operators like ==, <, etc.)

ii. The nodes of the list must be doubly-linked (i.e. pointers should exist to both next and previous nodes (with the previous node for the starting element simply pointing to NULL). In addition to ListStart, your list must have a ListEnd pointer, that always points to the final node in the list.

iii. It must have all operations common to LLSList. When searching for an item using the GetItem operation, however, the operation must proceed from front to back if the first character is between A and M, and back to front if the first character is between N and Z. (You can assume every string is capitalized.) Lastly, the GetItem call must indicate through simple output (e.g. cout) whether the search is being performed from front-to-back or back-to-front.

You must package your code within the included main.cpp file, and it is highly suggested you check to verify your code compiles and works correctly with the file.

#include  #include #include"DLS_List.hpp" int main(int argc, char** argv) { DLSList TestList; std::cout<<"Newly Created List: "; TestList.PrintList(); TestList.PutItem("Robinson"); TestList.PutItem("Smith"); TestList.PutItem("Ananthakrishnan"); TestList.PutItem("Contreras"); TestList.PutItem("Bailey"); TestList.PutItem("Paddington"); TestList.PutItem("Sampson"); std::cout<<"List after 'PutItem' calls: "; TestList.PrintList(); std::cout<<"Length after 'PutItem' calls: " <                        

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

Professional Visual Basic 6 Databases

Authors: Charles Williams

1st Edition

1861002025, 978-1861002020

More Books

Students also viewed these Databases questions

Question

How did psychology evolve from the 1920s to the present daypg15

Answered: 1 week ago

Question

l Define job evaluation and discuss four methods of performing it.

Answered: 1 week ago

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago