(The TriangleError class) Define an exception class named TriangleError that extends RuntimeError. The TriangleError class contains the private
data fields side1, side2, and side3 with accessor methods for the three sides of a triangle. Modify the Triangle class in Exercise 12.1 to throw a
TriangleError exception if the three given sides cannot form a triangle.
Sorry the answer is not available at the moment…
If you are able to find the answer, please make sure to post it here. So that your Juniors have smile on their lips and feel happy.
Spread the 'tradition of sharing'.