package ru.job4j.condition;

/**.
 *package for program Point.
 * @author Anastasia Pavlova (mailto: a-pavlova-1986@yandex.ru)
 * @version $Id$
 * since 0.1
 */

public class Triangle {
    private Point a;
    private Point b;
    private Point c;

    public Triangle(Point a, Point b, Point c) {
        this.a = a;
        this.b = b;
        this.c = c;

    }

    public double area(double x1, double x2, double x3, double y1, double y2, double y3) {
//calculate the triangle area
        double area = 1/2 * ((x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1));
        return area;
    }
}

@@ -360,16 +360,20 @@
 %0A    %7D%0A%0A
+    
     publ
@@ -391,183 +391,753 @@
 rea(
-double x1, double x2, double x3, double y1, double y2, double y3) %7B%0A//calculate the triangle area%0A        double area = 1/2 * ((x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1));%0A
+) %7B%0A//calculate the triangle area%0A        double area = 0.5 * ((this.b.getX() - this.a.getX()) * (this.c.getY() - this.a.getY()) - ((this.c.getX() - this.a.getX()) * (this.b.getY() - this.a.getY())));%0A        return area;%0A    %7D%0A%0A    public boolean realTriangle() %7B%0A        double alength = Math.sqrt((this.a.getX() - this.c.getX())%5E2 + (this.a.getY() - this.c.getY())%5E2);%0A        double blength = Math.sqrt((this.b.getX() - this.a.getX())%5E2 + (this.b.getY() - this.a.getY())%5E2);%0A        double clength = Math.sqrt((this.b.getX() - this.c.getX())%5E2 + (this.b.getY() - this.c.getY())%5E2);%0A        if (alength + blength %3E clength && blength + clength %3E alength && clength + alength %3E blength) %7B%0A            return true;%0A        %7D%0A        else %7B%0A    
     
@@ -1147,22 +1147,35 @@
  return 
-area
+false
 ;%0A    
-%7D
+    %7D%0A%0A    %7D%0A
 %0A%7D%0A

add maven