Question: * * * 1 0 . 1 2 ( Geometry: the Triang 1 e 2 D class ) Define the Tri ang 1 2 DD
Geometry: the TriangeD class Define the Tri angDD class that contains:
Three points named p p and p of the type MyPoint with getter and
setter 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 point
is inside this triangle see Figure a
A method contains TriangeD that returns true if the specified
triangle is inside this triangle see Figure b
A method overaps TriangeD that returns true if the specified
triangle overlaps with this triangle see Figure c java code
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
