Question: 10.12 (Geometry: the Triangle2D class) Define the Triangle2D class that contains: Three points named p1, p2, and p3 of the type MyPoint with getter and

10.12 (Geometry: the Triangle2D class) Define the Triangle2D class that contains: Three points named p1, p2, and p3 of the type MyPoint with getter and setter methods. MyPoint is defined in Programming Exercise 10.4. We completed this in class. In Class Program 1.0. A no-arg constructor that creates a default triangle with the points (0,0),(1,1), and (2,5) A constructor that creates a triangle with the specified points. A method getArea() that returns the area of the triangle. . .A method getPerimeter) that returns the perimeter of the triangle. A method contains(MyPoint p) that returns true if the specified point p is inside this triangle. You will have to research how you might solve this
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
