package ru.job4j.condition;
/**
    Class for calculating area of triangle.
*/
public class Triangle {
    /**
	@param a first point of triangle.
    */
    private Point a;
    /**
    * @param b second point of triangle.
    */
    private Point b;
    /**
    * @param c third point of triangle.
    */
    private Point c;
    /**
    * Base constructor for initiate points.
    * @param a first point.
    * @param b second point.
    * @param c third point.
    */
    public Triangle(Point a, Point b, Point c) {
	this.a = a;
	this.b = b;
	this.c = c;
    }
    /**
    * @return area of triangle if possible, or -1 if it cannot be.
    */
    public double area() {
	if ((a.getX() == b.getY() && a.getY() == b.getY())
	|| (b.getX() == c.getX() && b.getY() == c.getY())
	|| (a.getX() == c.getX() && a.getY() == c.getY())
	|| (a.getX() == b.getX() && a.getX() == c.getX())
	|| (a.getY() == b.getY() && a.getY() == c.getY())) {
	    return -1D;
	}
	return Math.abs((Double.valueOf((a.getX() - b.getX()) * (c.getY() - b.getY()))
		- Double.valueOf((a.getY() - b.getY()) * (c.getX() - b.getX()))) / 2);
    }
}
@@ -677,255 +677,167 @@
 f ((
-a.getX() == b.getY() && a.getY() == b.getY())%0A%09%7C%7C (b.getX() == c.getX() && b.getY() == c.getY())%0A%09%7C%7C (a.getX() == c.getX() && a.getY() == c.getY())%0A%09%7C%7C (a.getX() == b.getX() && a.getX() == c.getX())%0A%09%7C%7C (a.getY() == b.getY() && a.getY() == c.getY(
+calcSide(a, b) %3C calcSide(a, c) + calcSide(b, c))%0A%09 && (calcSide(a, c) %3C calcSide(a, b) + calcSide(b, c))%0A%09 && (calcSide(b, c) %3C calcSide(a, b) + calcSide(a, c
 ))) 
@@ -854,24 +854,8 @@
 urn 
--1D;%0A%09%7D%0A%09return 
 Math
@@ -995,15 +995,275 @@
 ) / 2);%0A
+%09%7D%0A%09return -1D;%0A    %7D%0A    /**%0A    * @param a - first point.%0A    * @param b - second side.%0A    * @return length of a side.%0A    */%0A    public double calcSide(Point a, Point b) %7B%0A%09return Math.sqrt(Math.sqrt(b.getX() - a.getX()) + Math.sqrt(b.getY() - a.getY()));%0A
     %7D%0A%7D

change conditions in Triangle.java for tast #9461