[Solved]7 18 Points Class Definition Use Define Complete Class Called Triangle Models Triangle Ter Q37170161
7. (18 points) Class Definition and Use Define a complete class called Triangle which models a triangle in terms of the lengths of its th In doing so: 1. Establish three private instance variables of type double to represent the three sides of the triangle. 2. Define a constructor for equilateral triangles (all sides are equal) which takes one parameter of type 3. Define another constructor for arbitrary triangles which takes three parameters of type double, one Call the sides sideA and sideB and sideC double and binds each of the instance variables to the value of this parameter. for each side of the triangle, and binds the instance variables to the values of these parameters. 4. Define a nethod called perimeter taking no parameters which returns the perimeter of the triangle Show transcribed image text 7. (18 points) Class Definition and Use Define a complete class called Triangle which models a triangle in terms of the lengths of its th In doing so: 1. Establish three private instance variables of type double to represent the three sides of the triangle. 2. Define a constructor for equilateral triangles (all sides are equal) which takes one parameter of type 3. Define another constructor for arbitrary triangles which takes three parameters of type double, one Call the sides sideA and sideB and sideC double and binds each of the instance variables to the value of this parameter. for each side of the triangle, and binds the instance variables to the values of these parameters. 4. Define a nethod called perimeter taking no parameters which returns the perimeter of the triangle
Expert Answer
Answer to 7. (18 points) Class Definition and Use Define a complete class called Triangle which models a triangle in terms of the … . . .
OR

