Homework Help Question & Answers
Must be written in C++ Please Lab 11 Due Date: April 25, 2019 Total Points: 15…
Must be written in C++ Please
Lab 11 Due Date: April 25, 2019 Total Points: 15 points The purpose of this lab is to implement and test a static and dy namic stack Part 1: Static Stack In this part, you are going to design a stack of characters. Assume a simple static array implementation. Complete the code below as specified by the comments below const int MAX- 5 // define an alias for the element type class Stack private: // declare an array of chars with MAX slots // and an integer to hold the index of the top element public: // Write the prototype of the following public methods // constructor, push, pop, isEmpty, isFull, displayAll // implement the public methods here int main 0 Stack S char c cout
s. push (、c, ) ; s .push (、d, ) ; s.push (‘e) s.push (、f, ) ; s.push’g’) cout
void push (el t)i void pop (el-t &); void getTop (el_t&) conat; void displayAl1) const; bool isEmpty const; // implement the public methods highlighted in bold here int main ) Stack S el t c; cout
s .pop (c): cout
Add a comment