Question: c++ Sample Run Note: Bold font is what the user entered LuclenorodriguezolucionesStacks./..out Enter on tx expression to evaluate 3.9.4.3/2 - 5 Infix + 5).(4-3/2) -

c++  c++ Sample Run Note: Bold font is what the user entered
LuclenorodriguezolucionesStacks./..out Enter on tx expression to evaluate 3.9.4.3/2 - 5 Infix +

Sample Run Note: Bold font is what the user entered LuclenorodriguezolucionesStacks./..out Enter on tx expression to evaluate 3.9.4.3/2 - 5 Infix + 5).(4-3/2) - 5 Postfix: 35.4327... Tould you like to try again (Y/01 Y Enter an unfix expression to evaluate: 7.65 Intix: 7.6+ Postfix 765 Ans: 47 tout you like to try again cry Enter en infix expression to evaluate 3+ (45) Postfix 345.. An: 25 Tould you like to try again Way Enter on infix expression to evaluate 3.6.7.-3 Infix: 3.6.7.1-3 Postfix: 367.3.3 Ans: 336 Would you like to try again (Y/?y Inter on infix expression to vlugte (32-7005- (62 Tafix: (W2 - 765-6)). (4/7) Postfix 32 A756-42/ A 2 Would you like to try again com Objective The objective of the homework assignment is to create a calculator program. The program will ask the user to enter a mathematical expression as an intox expression and your program will do two things. 1) It will covert the info expression to postfix expression and display the result and 2) It will evaluate said expression. Program Details The program will only work with single integer digits (0.1, 2.9) and the class strung There will be a minimum of three (3) functions; main, InfusToPostfix, and Evaluate main The main function will ask the user to enter an infix expression as a string and call the function InfaToPostfor passing the string as an argument. Then main will pass the string that Info:ToPostfix returns to a function call to Evaluate. Main will then display the infix string the user enter the postfix string and finally the answer from Evaluate. Finally, main wit ask the user if they wish to calculate another expression InfixToPostfix The function will take as argument a string and return a string. The purpose of the function is to use the STL orary stock and the algorithm we discussed in class to convert an infix string expression to a postfix string expression Evaluate: The function will take as argument a string and return a double (yes, you read that right). It will return a double because there could be an integer division! The purpose of the function is to use the STL library stark and the other sporithm we discussed in class to evaluate a postfix mathematical expression Operators: What kind of operators are we going to work with? Simple math operators and exponent/power function. where Notes You can create and use more functions if you like, however, the only requirement will be to have at least the three functions mentioned in the Program Details. Make sure you follow the Cadine Style Guidelines You can use the type library for the digit function and the cith library for the power/exponent function() Lastly, your program should work if the user enters spaces or no spaces between the values and operators Name the implementation file main.cpp and place it in HWOB directory so it will build and run. Let me know if you have any questions

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!