Calculator Problem Set Javadocs

calculator
Class ButtonHandler

java.lang.Object
  extended bycalculator.ButtonHandler
All Implemented Interfaces:
Animate

public class ButtonHandler
extends java.lang.Object
implements Animate

This class provides the smarts for a basic four-function calculator. It repeatedly calls its Calculator(GUI)'s getButton() to consume the buttonIDs that the Calculator object produces.

Copyright (c) 1999 Massachusetts Institute of Technology

Version:
$Id: ButtonHandler.java,v 1.1.1.1 2002/06/05 21:56:34 root Exp $
Author:
Todd C. Parnell, tparnell@ai.mit.edu, Emil Sit, sit@mit.edu, Lynn Andrea Stein, las@ai.mit.edu
See Also:
Calculator, IntBuffer

Field Summary
protected  CalculatorState brains
           
protected  Calculator gui
           
protected  AnimatorThread spirit
           
 
Constructor Summary
protected ButtonHandler()
           
protected ButtonHandler(CalculatorGUI myGUI)
          Build a ButtonHandler object from a Calculator gui passed in as an argument.
 
Method Summary
 void act()
          Provides the interactive control loop of this animate object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gui

protected Calculator gui

brains

protected CalculatorState brains

spirit

protected AnimatorThread spirit
Constructor Detail

ButtonHandler

protected ButtonHandler(CalculatorGUI myGUI)
Build a ButtonHandler object from a Calculator gui passed in as an argument.


ButtonHandler

protected ButtonHandler()
Method Detail

act

public void act()
Provides the interactive control loop of this animate object.

Specified by:
act in interface Animate
See Also:
Animate

Calculator Problem Set Javadocs