Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using C++ or Java, create a doubly linked list data structure . At a minimum, you must have a List class that contains the list

Using C++ or Java, create a doubly linked list data structure. At a minimum, you must have a List class that contains the list functionality (including an insert function) and a linking object ("node") class. Include the data in the node objects. Your list must have functions to both insert and remove (and return) values from both the front and end of the list. You must code the list yourself use of a "standard container" (such as an STL class, Vector, or ArrayList) is not permitted.

Using composition (with the List class,) define a Stack class that has push and pop functions, as well as an isEmpty function.

(Each of your classes may have any additional functionality that you deem necessary)

Write a main function that will read an unspecified number (until EOF) of input strings (each string may include whitespace and is terminated with a newline) from STDIN. Push each string into your Stack. After you have read all of the input, pop each string from your Stack, printing it to STDOUT (one per line). Your program should have no other output.

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

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Sham Navathe

4th Edition

0321122267, 978-0321122261

More Books

Students also viewed these Databases questions

Question

a sin(2x) x Let f(x)=2x+1 In(be)

Answered: 1 week ago