Define a class called Triangle that is capable of computing the perimeter and area of a triangle, given its three sides a, b, and c, as shown below. Notice that side b is the base of the triangle.
The design of this class is identical to that for the Ch5Circle class from Section 5.1. Define a private method isValid to check the validity of three sides. If any one of them is invalid, the methods getArea and getPerimeter will return the constant INVALID_DIMENSION.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.