/** * */ package de.fhswf.in.inf.java1.aufgabe12; /** * Divides two double values. * * @author $Author: $ * @version $Revision: $, $Date: $ UTC */ public class Division extends BinaryOperator { /** * Intentionally empty. * */ public Division() { } /* * (non-Javadoc) * * @see de.fhswf.in.inf.java1.aufgabe12.BinaryOperator#eval(double, double) */ @Override final double eval(double d1, double d2) { if (d2 == 0.0) { throw new IllegalArgumentException("Divisor can't be 0."); } return d1 / d2; } }