Subtraction.java 363 Bytes
package kernel.operation;

import kernel.Cell;

public class Subtraction extends BinaryOperation {
	
	public Subtraction(Cell leftCell, Cell rightCell) {
		super(leftCell, rightCell);
	}
	
	@Override
	public String getOperator() {
		return "-";
	}
	
	@Override
	public double eval() {
		return this.getLeftCell().getValue() - this.getRightCell().getValue();
	}
}