Question: C++ Coding exercise 1 - Implement a stack using arrays Create a template called arrayStack that implements a stack using an array in a file

C++C++ Coding exercise 1 - Implement a stack using arrays Create a

Coding exercise 1 - Implement a stack using arrays Create a template called arrayStack that implements a stack using an array in a file called arrayStack.h. The template should have the functionalities of push, pop, top, size, maxSize, and empty as described in the lecture. Coding exercise 2 - Implement the algorithm to convert an expression from infix to postfix using your array stack The algorithm to convert from infix expression to postfix expression is available in the textbook. A handout is also included with this assignment that contains the pseudocode for the algorithm. I do not encourage directly using the algorithm without attempting to write it out yourself first. Name your source file myInfixPostfix. cpp. Assume that you only have operators +, -, *,/. Test cases you can use: A +B - C; A((BC (E -F) - G)/(H -l); A+B* (CD) - E/F G+H; Coding exercise 3 - Implement the algorithm to convert an expression from infix to postfix using the STL stack Replace the stack implementation in your code to convert from infix expression to postfix expression with the STL stack implementation. The reference for the STL template is here. Name your source file stlInfixPostfix. cpp. To avoid multiple definitions of main errors, name your functions myInfixPostfix and stlInfixPostfix In myInfixPostfix.cpp and stlInfixPostfix.cpp. Create two additional header files myInfixPostfix.h and stlInfixPostfix.h that contain the prototypes of the functions and a main.cpp file that includes those headers and calls the infixPstfix functions as necessary Coding exercise 1 - Implement a stack using arrays Create a template called arrayStack that implements a stack using an array in a file called arrayStack.h. The template should have the functionalities of push, pop, top, size, maxSize, and empty as described in the lecture. Coding exercise 2 - Implement the algorithm to convert an expression from infix to postfix using your array stack The algorithm to convert from infix expression to postfix expression is available in the textbook. A handout is also included with this assignment that contains the pseudocode for the algorithm. I do not encourage directly using the algorithm without attempting to write it out yourself first. Name your source file myInfixPostfix. cpp. Assume that you only have operators +, -, *,/. Test cases you can use: A +B - C; A((BC (E -F) - G)/(H -l); A+B* (CD) - E/F G+H; Coding exercise 3 - Implement the algorithm to convert an expression from infix to postfix using the STL stack Replace the stack implementation in your code to convert from infix expression to postfix expression with the STL stack implementation. The reference for the STL template is here. Name your source file stlInfixPostfix. cpp. To avoid multiple definitions of main errors, name your functions myInfixPostfix and stlInfixPostfix In myInfixPostfix.cpp and stlInfixPostfix.cpp. Create two additional header files myInfixPostfix.h and stlInfixPostfix.h that contain the prototypes of the functions and a main.cpp file that includes those headers and calls the infixPstfix functions as necessary

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!