School of Engineering and Applied Science
Department of Computer Science
CSci 133 -- Algorithms and Data Structures I
http://www.seas.gwu.edu/~csci133/spring03
Prof. Michael B. Feldman
mfeldman@gwu.edu

Project #5

Due Date: beginning of class, Wednesday, April 9, 2003

The objective in this project is to develop a simple RPN calculator: an application that repeatedly

  1. prompts the user to enter a valid RPN expression
  2. evaluates the expression using the Bauer-Samelson algorithm discussed in class
  3. displays the result of the evaluation
An expression consists of nonnegative floating-point values and the operators + - * /. Successive tokens are separated by blanks.

Before attempting this project, make sure to complete lab exercise 6, in which you developed a stack class using linked lists, and lab exercise 8, in which you experimented with StringTokenizer.

Note: Don't try to use the evaluation examples in the Main book; you'll end up much more confused than if you start from scratch!

What to submit:

Follow the guide distributed in lab.