1.Learning Objectives:

  • Use Stack data structure to solve problems
  • Use java.util.Stack class or implement own Stack class
  • Convert infix expressions to postfix expressions
  • Evaluate postfix expressions
  • Define classes and create driver class to test the class definitions
  • Write a complete program to evaluate infix expressions

2.General Descriptions:

The program prompts and reads an infix expression; evaluates the express and displays the result. It assumes that the infix expression is a valid expression which might has integers, parenthesis and operators +, -, *, /. The division is integer division.

3.Requirements:

  • Create a class that can convert an infix notation to a postfix notation.
  • Create a class that can evaluate the postfix notations.
  • Create a driver class that prompts and reads an infix expression and display the value of the expression.

4.References:

  • Koffman & Wolfgang, Data Structures: Abstraction and Design Using Java, 2nd Edition: Pages 170-188.
  • Lecture notes.
Academic Honesty!
It is not our intention to break the school's academic policy. Projects posted are only used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly fill out the form. Please provide a valid email address and we'll get back to you in less than 24 hours. We will be sending an invoice through PayPal upon confirmation. We are a non profit organization however we need an amount to keep this organization running, and to be able to complete our research and development.