// ============================================================
// = CORBA Sample				                              =
// ============================================================

// Implementation with POA

public class CalculatorPOAImpl extends CalculatorPOA
{
	/**
	 * Add Operation 
	 */
	public float add(float nb1, float nb2)
	{
		System.out.println("Addition = "+nb1+" + "+nb2);
		return nb1 + nb2;
	}

	/**
	 * Div Operation
	 */
	public float div(float nb1, float nb2)
		throws DivisionByZero
	{
		System.out.println("Division = "+nb1+" / "+nb2);

		if ( nb2 == 0 )
			throw new DivisionByZero(nb1,nb2);

		return nb1 / nb2;
	}
}