@@ -0,0 +1,870 @@
+package ru.matevosyan;%0A%0A%0A%0Apublic class Triangle %7B%0A%0A%09public Point a;%0A%09public Point b;%0A%09public Point c;%0A%0A%09public Triangle(Point a, Point b, Point c) %7B%0A%0A%09%09this.a = a;%0A%09%09this.b = b;%0A%09%09this.c = c;%0A%09%7D%0A%0A%09public double area() %7B%0A%0A%09%09//calculate the triangle area%0A%09%09%0A%09%09double distanceFromAToB = a.distanceTo(b);%0A%09%09double distanceFromBToC = b.distanceTo(c);%0A%09%09double distanceFromAToC = a.distanceTo(c);%0A%0A%09%09double p = (distanceFromAToB + distanceFromBToC + distanceFromAToC)/2;%0A%09%09double triangleSquare = Math.sqrt(p * (p - distanceFromAToB) * (p - distanceFromBToC) * (p - distanceFromAToC)); %0A%09 %0A%09%09if (distanceFromAToB %3E (distanceFromBToC + distanceFromAToC) %7C%7C distanceFromBToC %3E (distanceFromAToC + distanceFromAToB)%0A%09%09%7C%7C distanceFromAToC %3E (distanceFromAToB + distanceFromBToC ) ) %7B%0A%0A%0A%09%09%09throw new ArithmeticException(%22Does not exist%22);%0A%0A%09%09%7D %0A%09%09%0A%09%09return triangleSquare;%0A%0A%09%09%0A%09%7D%0A%7D

add Triangle.java