Question: Q - 1 1 . With the Point class definition as given in the above question, write the definition of a Triangle class that uses
Q With the Point class definition as given in the above question, write the definition of a Triangle class that uses Point objects as its vertices. The class should have an appropriate constructor method that returns a string representation of the trianle. Write three other methods for the triangle class as specified below :
a An area method that finds and returns the area of the triagle by using the lengths abc of the three sides of the triangle.
b Write a boolean method isPossible that tests whether the triangle with the given vertices is possible with the criterian that the length of any of the sides of the triangle should not exceed the sum of lengths of the other two sides.
c Write another boolean method isEquilateral that decides whether the triangle is equilateral or not.
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
