Question: Program 3: Working with Stacks The purpose of this tab is to 1 Reinforce your C++ programming skill 2. Provide experience using the stack dots
Program 3: Working with Stacks The purpose of this tab is to 1 Reinforce your C++ programming skill 2. Provide experience using the stack dots structure 3. Provide experience using STL For this tab you are to write a class EvenStack that implements a stack of integers that contains only even numbers, Requirements: Implement a EvenStackClass The class should store an integer values in a stack The dass should implement the basic stack operations omply, sir, top, push, and pop - The class should implement a method getEvenNumbers The getEvenNumbers funtion receives a stack of integers implemented in the by STL stack) and pushes all of the even numbers from the input stack preserving their original order onto the EvenStack obpact. Por exemple, given the stack (4,5 3,26,9.2Whored is at the top of the stack), the function pushes (4.2.6.2} The initial stack should retain is original values when the function ends The dass should implement a method empty Stack The empty Stack function pops each ciment of and outputs each element on the stack Use the main function (ven on the course website to test your program Submnission Your submission should include two files (the opp file and file) for the EvenStack class. Do not up the files and do not what project files object flos, binary us, or any other type of files
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
