Class DivisionOperator

java.lang.Object
  |
  +--Operator
        |
        +--DivisionOperator

public class DivisionOperator
extends Operator

This represents the operator / in an arithmetic equation; as in 6 / 2 = 3.


Fields inherited from class Operator
numberOperands, precedence, preceededByAnOperand, token
 
Constructor Summary
DivisionOperator()
          Creates an Operator with: token: / precedence: 2 numberOperands: 2 preceededByAnOperand: true
 
Method Summary
 int operate(int[] x)
           
 
Methods inherited from class Operator
isHigherPrecedence, isLowerPrecedence, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DivisionOperator

public DivisionOperator()
Creates an Operator with:
Method Detail

operate

public int operate(int[] x)
Parameters:
x[] - the operands
Returns:
x[0] / x[1]
Overrides:
operate in class Operator