package task1;

/**     : aX*X + bX + c = 0,  a, b, c - ;
 */
public class Resolver {
	/**
	 *      .
	 * @param a   x*x, a != 0;
	 * @param b   x;
	 * @param c  ;
	 */
	public Resolver(float a, float b, float c) {
		if (a == 0)
			throw new IllegalArgumentException("a equals zero");
		this.a = a;
		this.b = b;
		this.c = c;
	}
	
	public float getA() { return a; }

	public float getB() { return b; }

	public float getC() { return c; }

	/**
	 *       .
	 * @return       null    .
	 */
	public Root<Double, Double> resolve() {
		if (!isResolved) {
			double discr = Discriminant();
		
			if (discr > 0) {
				double discrSqrt = Math.sqrt(discr);
				double x1 = (-b + discrSqrt) / (2d * a);
				double x2 = (-b - discrSqrt) / (2d * a);
				result = new Root<Double, Double>(x1, x2);
			} else if (discr == 0) {
				double x = - b / (2d * a);
				result = new Root<Double, Double>(x, x);
			} else
				result = null;
		}
			isResolved = true;
		
		return result;
	}

	/**
	 *         .
	 * @param a   x*x;
	 * @param b   x;
	 * @param c  ;
	 * @return        .
	 */
	public double Discriminant() {
		return (double) b * b - 4d * a * c;
	}

	private float a;
	private float b;
	private float c;
	private Root<Double, Double> result;
	private boolean isResolved;
}
@@ -13,160 +13,40 @@
 1;%0A%0A
-/**     : aX*X + bX + c = 0,  a, b, c - ;%0A */%0Apublic class Resolver %7B%0A%09/**%0A%09 *      .%0A%09 * @param a   x*x, a != 0;%0A%09 * @param b   x;%0A%09 * @param c  ;%0A%09 */
+public class Resolver %7B%0A%09// a!=0
 %0A%09pu
@@ -318,56 +318,8 @@
 %7D%0A%0A%09
-/**%0A%09 *       .%0A%09 * @return       null    .%0A%09 */
 %0A%09pu
@@ -800,105 +800,8 @@
 %7D%0A%0A%09
-/**%0A%09 *         .%0A%09 * @param a   x*x;%0A%09 * @param b   x;%0A%09 * @param c  ;%0A%09 * @return        .%0A%09 */
 %0A%09pu
@@ -993,8 +993,9 @@
 olved;%0A%7D
+%0A

Update Resolver.java