package ru.pravvich;

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

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

		
	//calculate the triangle area
	public double area(Point a, Point b, Point c) {
		double result, semiper, distanseAB, distanseAC, distanseBC;
		
		distanseAB = a.distanceTo(b);
		distanseAC = a.distanceTo(c);
		distanseBC = b.distanceTo(c);

		semiper = (distanseAB + distanseAC + distanseBC)/2;
		result = Math.sqrt(semiper * (semiper - distanseAB) * (semiper - distanseAC) * (semiper - distanseBC));
		return result;
	}
}
@@ -186,17 +186,20 @@
 %0A%09%7D%0A%0A%09%09%0A
-%09
+    
 //calcul
@@ -220,17 +220,20 @@
 le area%0A
-%09
+    
 public d
@@ -272,18 +272,24 @@
 nt c) %7B%0A
-%09%09
+        
 double r
@@ -298,17 +298,8 @@
 ult,
- semiper,
  dis
@@ -335,13 +335,17 @@
 BC;%0A
-%09%09%0A%09%09
+%0A        
 dist
@@ -370,18 +370,24 @@
 eTo(b);%0A
-%09%09
+        
 distanse
@@ -408,18 +408,24 @@
 eTo(c);%0A
-%09%09
+        
 distanse
@@ -447,18 +447,328 @@
 To(c);%0A%0A
-%09%09
+        if (distanseAB + distanseAC %3C= distanseBC %7C%7C distanseAB + distanseBC %3C= distanseAC %7C%7C distanseAC + distanseBC %3C= distanseAB) %7B%0A            System.out.println(%22%D0%A2%D0%B0%D0%BA%D0%BE%D0%B3%D0%BE %D1%82%D1%80%D0%B5%D1%83%D0%B3%D0%BE%D0%BB%D1%8C%D0%BD%D0%B8%D0%BA%D0%B0 %D0%BD%D0%B5 %D1%81%D1%83%D1%89%D0%B5%D1%81%D1%82%D0%B2%D1%83%D0%B5%D1%82!%22);%0A            return -1;//%D1%82%D1%83%D1%82 %D0%B1%D1%8B %D1%8D%D0%BA%D1%81%D0%B5%D0%BF%D1%88%D0%B5%D0%BD %D0%B2%D1%8B%D0%B1%D1%80%D0%BE%D1%81%D0%B8%D1%82%D1%8C%0A        %7D else %7B%0A            double semiper;%0A            
 semiper 
@@ -811,14 +811,26 @@
 eBC)
-/2;%0A%09%09
+ / 2;%0A            
 resu
@@ -929,18 +929,28 @@
 seBC));%0A
-%09%09
+            
 return r
@@ -956,12 +956,37 @@
 result;%0A
-%09%7D
+        %7D//if%0A    %7D//method
 %0A%7D

add chapter_001\lesson_3\src\main\java\ru\pravvich\Triangle.java