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

Project #5
Due Date: beginning of class, Thursday, April 27, 2006
NO projects can be accepted after the April 27 deadline.

In this project you will develop an interactive application that emulates the operation of a calculator that has a number of registers and supports complex calculations. You will find Chapter 9 to  be very helpful, especially section 9.5.

Abstract description of the calculator

Our calculator has six variables or registers. Further, the calculator has three commands. These are: Here is an example of a run of the calculator. The calculator responses are indented.

CLEAR
  OK
SET B = 3.0
  OK
SET E = 5.0
  OK
SET D = (B * E) / 2.0
  OK
EVAL D
  7.5
SET E = 4.0
  OK
EVAL D
  6.0
SET F = B + D)
  ERROR

Implementation

Here are some implementation specifications.
Other than meeting the above specs, you are free to design the details of your project. For example, use your judgement about how to handle errors, how to put methods into classes, etc. Document your design carefully; any correct design will be given full marks.