Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In C++ language. Stacks and Queues are data structures which may be implemented as Abstract Data Types - ADTs may be implemented as objects which
In C++ language.
Stacks and Queues are data structures which may be implemented as Abstract Data Types - ADTs may be implemented as objects which promote reuse of the ADT. List Abstract Data Type Data: listItemType : record data: dataType implementation : implementationType // implementation is any artifact read to implement the listItemType within a target language end record ListItem: list ItemType Operations: Initi Insert IntoList (data) Insert (data, ATSTART) Insert (data, INTOMIDDLE) Insert (data, ATEND) Delete (datakey) bool Search (datakey) Sort (order) Sort (ASC DESC) Iterate() start() dataType getNext() bool hasNext() Stack Abstract Data Type Data: List ItemType Operations Init() push (data) dataType pop! bool isEmpty() bool ispull) dataType showtop() Queue Abstract Data Type Data: ListItem Type Operations Init() enqueue (data) dataType dequeue () bool isEmpty() bool isfully sort ) sort (ASC I DESC) bool search (datakey) Develop an object hierarchy which implements Stack and Queue ADTS as derivatives of a List ADT. Test your implementation via a stub program that declares "instances of the stack and queue objects. Be certain to exercise all methods (constructors, etc) in your stub tests. Submit the following items for review: 1) A copy of the class model for your design 2) a copy of all source code file(s). 3) a copy of all data file(s). 4) a copy of all reports generated by the stub testsStep 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