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

Project #5
Due Date: beginning of class, Thursday, Dec. 4, 2003
You may submit late projects to your lab instructor's mailbox through 5 PM, Dec. 8, with the usual late fee.
NO projects will be accepted after the Dec. 8 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 considerations.
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 design that meets the specs will be given full marks.