Class SineOperator

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

public class SineOperator
extends Operator

This represents the operator sin in an arithmetic equation. It returns the trigonometric sine.


Fields inherited from class Operator
numberOperands, precedence, preceededByAnOperand, token
 
Constructor Summary
SineOperator()
          Creates an Operator with: token: sin precedence: 2 numberOperands: 1 preceededByAnOperand: false
 
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

SineOperator

public SineOperator()
Creates an Operator with:
Method Detail

operate

public int operate(int[] x)
Parameters:
x[] - the operands in degrees
Returns:
(int)Math.sin(x[0])
Overrides:
operate in class Operator