Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Do this usign STL STACK The operators shall include +,-,*,/,(,),++,--, **, mod,

ID: 3554298 • Letter: D

Question

Do this usign STL STACK

  The operators shall include +,-,*,/,(,),++,--, **, mod, div

Write a main.cpp that creates a few test example mathExp objects that demonstrates the working

of your mathExp class. (a sample is loaded in the attachments, add more expressions if you implement other operators, e.g. exp).

Challenge:

(Infix to Postfix) Write a program that converts an infix expression into an equivalent postfix expression. The rules to convert an infix expression into an equivalent postfix expression are as follows: Suppose infx represents the infix expression and pfx represents the postfix expression. The rules to convert infx into pfx are as follows:

Explanation / Answer

#include #include #include #include #include const max_length=10; class Evaluator { private: char infix_expression[25][6]; char postfix_expression[25][6]; char char_stack[max_length]; long int_stack[max_length]; int int_top; int char_top; int postfix_rows; int infix_rows; int input_characters_count; public: char char_pop( ); long int_pop( ); void set_initial_values( ); void get_infix_expression( ); void char_push(char); void show_infix_to_postfix_convertion( ); void int_push(long); void show_evaluation_of_postfix_expression( ); }; /*************************************************************************///---------------------- set_initial_values( ) ------------------------///*************************************************************************/void Evaluator::set_initial_values( ) { int_top=-1; char_top=-1; infix_rows=0; postfix_rows=0; for(int count_1=0;count_1
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote