Blame view

src/kernel/operation/Subtraction.java 405 Bytes
2e8fbd04   Remi   global refactor
1
2
  package kernel.operation;
  
2e8fbd04   Remi   global refactor
3
4
5
6
  import kernel.Cell;
  
  public class Subtraction extends BinaryOperation {
  
1ff9c9a9   [mandjemb]   Recommandation pr...
7
8
9
  	private static final long serialVersionUID = 1L;
  
  	public Subtraction(Cell leftCell, Cell rightCell) {
2e8fbd04   Remi   global refactor
10
          super(leftCell, rightCell);
1ff9c9a9   [mandjemb]   Recommandation pr...
11
  
2e8fbd04   Remi   global refactor
12
13
      }
  
1ff9c9a9   [mandjemb]   Recommandation pr...
14
15
16
17
18
19
20
  	
  	public String getOperator(){
  		return "-";
  	}
  	
  	
      public double eval() {
2e8fbd04   Remi   global refactor
21
22
23
          return this.leftCell.getValue() - this.rightCell.getValue();
      }
  }