ca.bcit.cst.comp2526.assign2b.solution
Interface Operation

All Known Implementing Classes:
AbstractOperation, AdditionOperation, DivisionOperation, MultiplicationOperation, SubtractionOperation

public interface Operation

Abstracton for mathmatical operations.


Method Summary
 char getCode()
          Get the type of operation (eg.
 int perform(int operandA, int operandB)
          Perform the operation on the supplied operands.
 

Method Detail

getCode

char getCode()
Get the type of operation (eg. +, 1, *, or /)

Returns:
the type of operation.

perform

int perform(int operandA,
            int operandB)
Perform the operation on the supplied operands.

Parameters:
operandA - the first operand.
operandB - the second operand.
Returns:
the result of performing the operation on the operands.