slogo.instruction.arithmetic
Class Remainder

java.lang.Object
  extended by slogo.language.GrammarElement
      extended by slogo.instruction.Instruction
          extended by slogo.instruction.arithmetic.NumericInstruction
              extended by slogo.instruction.arithmetic.ArithmeticInstruction
                  extended by slogo.instruction.arithmetic.Remainder

public class Remainder
extends ArithmeticInstruction

Represents the remainder when two numbers are divided


Field Summary
 
Fields inherited from class slogo.instruction.arithmetic.ArithmeticInstruction
myLeft, myRight, mySymbol
 
Fields inherited from class slogo.language.GrammarElement
gelementsToValue
 
Constructor Summary
Remainder(GrammarElement first, GrammarElement second)
           
 
Method Summary
 java.lang.Double evaluate(Context c)
          Evaluate this language construct in some context.
 
Methods inherited from class slogo.instruction.arithmetic.ArithmeticInstruction
leftValue, rightValue, toString
 
Methods inherited from class slogo.instruction.Instruction
evaluateNumericExpression
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Remainder

public Remainder(GrammarElement first,
                 GrammarElement second)
Method Detail

evaluate

public java.lang.Double evaluate(Context c)
Description copied from class: GrammarElement
Evaluate this language construct in some context. The evaluation may have side-effects, e.g., moving a turtle.

Specified by:
evaluate in class NumericInstruction
Parameters:
c - context in which the evaluation takes place
Returns:
the result of evaluating the construct