I need to create a class called MyTriangle, which models a triangle with 3 vertices, is designed as follows. The MyTriangle class uses three MyPoint instances as the three vertices.

The class contains:

-Three private instance variables v1, v2, v3 (instances of MyPoint), for the three vertices.

-A constructor that constructs a MyTriangle with three points v1=(x1, y1), v2=(x2, y2), v3=(x3, y3).

-An overloaded constructor that constructs a MyTriangle given three instances of MyPoint.

-A toString() method that returns a string description of the instance in the format "Triangle @ (x1, y1), (x2, y2), (x3, y3)".

-A getPerimeter() method that returns the length of the perimeter in double. You should use the distance() method of MyPoint to compute the perimeter.

-A method printType(), which prints "equilateral" if all the three sides are equal, "isosceles" if any two of the three sides are equal, or "scalene" if the three sides are different.

Write the MyTriangle class. Also write a test program (called TestMyTriangle) to test all the methods defined in the class.

PS: The class MyPoint is attached.