public class Triangle extends Figure { private Point a, b, c; public Triangle(Point a, Point b, Point c) throws InvalidFigure { if (Point.sameLine(a, b, c)) throw new InvalidFigure(); this.a = a; this.b = b; this.c = c; } public Triangle(Point a, Point b, Point c, Color col) throws InvalidFigure { if (Point.sameLine(a, b, c)) throw new InvalidFigure(); this.a = a; this.b = b; this.c = c; this.col = col; } private Triangle() { a=new Point(0,0); b=new Point(1,0); c=new Point(0,1); } public boolean equals(Object t) { throw new UnsupportedOperationException(); } public double ab() { throw new UnsupportedOperationException(); } public double ac() { throw new UnsupportedOperationException(); } public double bc() { throw new UnsupportedOperationException(); } public double area() { throw new UnsupportedOperationException(); } public double perim () { throw new UnsupportedOperationException(); } }