Blame view

src/kernel/operation/Addition.java 357 Bytes
2e8fbd04   Remi   global refactor
1
2
  package kernel.operation;
  
2e8fbd04   Remi   global refactor
3
4
5
  import kernel.Cell;
  
  public class Addition extends BinaryOperation {
4186cd92   Remi   fix tests
6
7
8
9
10
  	
  	public Addition(Cell leftCell, Cell rightCell) {
  		super(leftCell, rightCell);
  	}
  	
080a0e68   Remi   change return
11
  	@Override
4186cd92   Remi   fix tests
12
13
14
15
  	public String getOperator() {
  		return "+";
  	}
  	
080a0e68   Remi   change return
16
  	@Override
4186cd92   Remi   fix tests
17
  	public double eval() {
080a0e68   Remi   change return
18
  		return this.getLeftCell().getValue() + this.getRightCell().getValue();
4186cd92   Remi   fix tests
19
  	}
2e8fbd04   Remi   global refactor
20
  }