Answered step by step
Verified Expert Solution
Question
1 Approved Answer
( Geometry: the Triangle 2 D class ) Define the Triangle 2 D class that contains: Three points named p 1 , p 2 ,
Geometry: the TriangleD class Define the TriangleD class that contains: Three points named p p and p of the type MyPoint with getter andsetter methods. MyPoint is defined in Programming Exercise A noarg constructor that creates a default triangle with the points and 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 pointp is inside this triangle see Figure a A method contains TriangleD t that returns true if the specifiedtriangle is inside this triangle see Figure b A method overlaps TriangleD t that returns true if the specifiedtriangle overlaps with this triangle see Figure c
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started