Blame view

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