Subtraction.java 419 Bytes
package kernel.operation;

import kernel.Cell;

public class Subtraction extends BinaryOperation {

    private static final long serialVersionUID = 1L;

    public Subtraction(Cell leftCell, Cell rightCell) {
        super(leftCell, rightCell);
    }


    public String getOperator() {
        return "-";
    }

    public double eval() {
        return this.leftCell.getValue() - this.rightCell.getValue();
    }
}