Question: Sample output: For this assignment you will provide a Stack class and a Queue class. These will be located in separate files. In addition, you
For this assignment you will provide a Stack class and a Queue class. These will be located in separate files. In addition, you will supply a single driver program that test all functionality in the two classes. Specifically, in C++: 1. Stack class: This class provides a dynamic array implementation of a stack of integers. It must protect the data from misuse and provide all standard public stack methods, including "push", "pop", and a Boolean method that tests for the empty stack (i.e. "isEmpty"). A "peek" method is required (returns value of top, but does not remove the integer from stack). You may add any other private methods needed in the class, but no other public methods are allowed. Name the class Stack. For this assignment you will provide a Stack class and a Queue class. These will be located in separate files. In addition, you will supply a single driver program that test all functionality in the two classes. Specifically, in C++: 1. Stack class: This class provides a dynamic array implementation of a stack of integers. It must protect the data from misuse and provide all standard public stack methods, including "push", "pop", and a Boolean method that tests for the empty stack (i.e. "isEmpty"). A "peek" method is required (returns value of top, but does not remove the integer from stack). You may add any other private methods needed in the class, but no other public methods are allowed. Name the class Stack
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
