Write a program to evaluate infix expressions and summarize


Prerequisites:

Before starting this programming assignment, participants should be able to:

Analyze a basic set of requirements for a problem

Compose C language programs

Create basic test cases for a program

Apply arrays, strings, and pointers

Summarize differences between array notation and pointer notation

Apply pointer arithmetic

Apply basic string handling library functions

Define and implement structures in C

Summarize the operations of a linked list

Describe the operations of a stack including: push (), pop (), peek () 

Overview & Requirements:

Write a program to evaluate infix expressions. An infix expression looks like the following:

9 * (5 - 4) + 2 / 6

This program must first convert the infix expression to a postfix expression, and then evaluate the postfix expression. A postfix expression for the above infix expression looks like the following:

9 5 4 - * 2 6 / +

For this assignment you will need to implement and apply one stack to convert from infix to postfix, and implement and apply a second stack to evaluate the postfix expression.

Please complete exercises 12.12 and 12.13 form your Deitel & Deitel C How to Program textbook. These exercises provide you with the algorithms required to perform the correct conversions and evaluations. Create a single program only, which combines both exercises. Also, be sure to allow the user to continue to enter infix expressions until they want to quit the program.

BONUS:

Provide appropriate test cases and drivers for each function in your stack application to receive up to 10 bonus points. For an additional 10 points allow for your program to accept multi-digit operands and unary sign operators (+ and -).

the assignment will be evaluated based on a successful compilation and adherence to the program requirements. We will grade according to the following criteria:

1) - Appropriate top-down design, style, and commenting according to class standards

2) - Correct stack function implementations

3) - Correct usage of infix stack

4) - Correct usage of postfix stack

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Write a program to evaluate infix expressions and summarize
Reference No:- TGS0659433

Expected delivery within 24 Hours