Question: Write a class called Triangle that implements the Comparable interface. The class should contain 3 fields: rexA (Point), vrtexB (Point), etcxC (point). Write the necessary

Write a class called Triangle that implements the Comparable interface. The class should contain 3 fields: rexA (Point), vrtexB (Point), etcxC (point). Write the necessary constructors, accessors, mutators and other methods. The Point class a. is given below b. Write a client class that creates an Accayist of 10 Triangle objects called list1 Print the list Call Collections.sact(list1), to sort the elements according to the area of the triangle. Print the sorted list lpublic class Point i private int x private int y; public Point) publis Point int x, int y) this xx; publis int cetxof return x publis int cetxof return y publis string tostciag) return (+x- ", "+ y")
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
