Division.java 664 Bytes
package noyau;

import noyau.exception.CellNotFoundException;
import noyau.exception.DivisionByZeroException;

public class Division extends OperationBinaire{
	
	Division(Case g,Case d){
		gauche=g;
		droite=d;
	}
	
	
	
	public double eval() throws DivisionByZeroException {
		
		try{
			if (!creerCycle(gauche) && !creerCycle(droite))
				
				return gauche.getValue()/droite.getValue();
			else 
				return 0;
		}
		catch(ArithmeticException ex){
			throw new DivisionByZeroException();
		}
		
		
		
		
		
	}
	
	
	public String toString(){
		
		return gauche.getId() +" / " + droite.getId() ;
	}
	
	
	
	public String getFormuleDeveloppe(){
		
		return "";
	}

}