I need to make a method like so
which will return the values either Equilateral, Isosceles, or Scalar.Code:public String TriangleType(Point a, Point b, Point c)
so far this is what I have:
One thing I don't understand is where to use point a, b, and c.Code:length1 = Math.sqrt(Math.pow((y2 - y1),2) + Math.pow((x2 - x1),2));
length2 = Math.sqrt(Math.pow((y3 - y2),2) + Math.pow((x3 - x2),2));
length3 = Math.sqrt(Math.pow((y1 - y3),2) + Math.pow((x1 - x3),2));
System.out.printf("(" + x1 + ", " + y1 + ")" + "(" + x2 + ", " + y2
+ ")" + "(" + x3 + ", " + y3 + ")");
System.out.printf("|(%.3f, %.3f, %.3f)",length1, length2, length3);
System.out.println();
if ((length1 != length2) && (length2 != length3))
{ System.out.println("SC"); return "SC"; }
else if ((length1 == length2) && (length1 == length3))
{ System.out.println("EQ"); return "EQ"; }
else { System.out.println("IS"); return "IS"; }
I also have a subclass of Point which I don't quite understand either. If someone could help me out with this please let me know. I can add information as needed.

