[solved]-Assignment Stack Assignment Write Program Visual C Evaluate Postfix Expression Using Algor Q39015824

Assignment – Stack Assignment Write a program in Visual C++ to evaluate a postfix expression using the algorithm in the book. Use the concept of stack in your program. You may use the Stack class specification (stack.b) and stack implementation (stack.cpp) as discussed in the class sample program. (stach.h and stack.cpp files are attached in the assignment and you need to make changes with the data types.) Sample postfix expression: 4 5 3 – $ Note: $ Sign represents exponentiation. Use a loop to enter 4,5, 3, $, and characters. Each character will be checked and if the character is a digit then it will be pushed onto the stack. If the character is nonnumeric means it is a operator (+,-*, /, or $) then top two items from the stack will be popped and computed then the value will be pushed onto the stack. Hint: 1. To check whether the character is a digit (0-9) or non-digit (+,- * /. $) Use function: isdigitſch) (the variable ch has the input character) 2. To compute the numeric value of a digit character, you use the following method: int (cb) – ‘O’ (the variable ch has the input character) 3. Use pow() function to compute the power. Show transcribed image text Assignment – Stack Assignment Write a program in Visual C++ to evaluate a postfix expression using the algorithm in the book. Use the concept of stack in your program. You may use the Stack class specification (stack.b) and stack implementation (stack.cpp) as discussed in the class sample program. (stach.h and stack.cpp files are attached in the assignment and you need to make changes with the data types.) Sample postfix expression: 4 5 3 – $ Note: $ Sign represents exponentiation. Use a loop to enter 4,5, 3, $, and characters. Each character will be checked and if the character is a digit then it will be pushed onto the stack. If the character is nonnumeric means it is a operator (+,-*, /, or $) then top two items from the stack will be popped and computed then the value will be pushed onto the stack. Hint: 1. To check whether the character is a digit (0-9) or non-digit (+,- * /. $) Use function: isdigitſch) (the variable ch has the input character) 2. To compute the numeric value of a digit character, you use the following method: int (cb) – ‘O’ (the variable ch has the input character) 3. Use pow() function to compute the power.
Expert Answer
Answer to Assignment – Stack Assignment Write a program in Visual C++ to evaluate a postfix expression using the algorithm in the … . . .
OR

