Question: ////////////////////////////////////////////////////// // Topics: circular arrays, templated classes, dynamic arrays // // Implement a stackQueue using a // circular array implementation as discussed in class. //

////////////////////////////////////////////////////// // Topics: circular arrays, templated classes, dynamic arrays // // Implement a stackQueue using a // circular array implementation as discussed in class. // Your data structure must increase its array size dynamically // if the array runs out of room. // // Abstractly, your stackQueue represents a list of items // with a front and back from which items may be added // or removed. If you choose to add and remove from just // one end, you effectively have a stack. If you choose // to add to the back and remove from the front, (or vice versa) // you effectively have a queue, thus the name "stackQueue". // // Please add comments and be detailed, thank you! Will rate (: /////////////////////////////////////////////////////// template class stackQueue { private: //declare your array variable and //any additional variables you need //to solve the problem public: stackQueue() {} //Insert x to the "back" of the list of items. void addBack(T x) {} //Add x to the "front" of the list of items. void addFront(T x) {} //Remove and return the item currently at the "back" of the list T removeBack() {} //Remove and return the item currently at the "front" of the list T removeFront() {} //Is the stackQueue empty? bool empty() {} }; 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!