Question: (Java) Design a class named Triangle that extends GeometricObject. The class contains: Three double data fields named side1, side2, and side3 with default values 1.0
(Java)

Design a class named Triangle that extends GeometricObject. The class contains: Three double data fields named side1, side2, and side3 with default values 1.0 to denote three sides of the triangle. A no-arg constructor that creates a default triangle. A constructor that creates a triangle with the specified side1, side2, and side3. . The accessor methods for all three data fields A method named getArea) that returns the area of this triangle. A method named getPerimeter) that returns the perimeter of this triangle. .A method named toString) that returns a string description for the triangle, including its side length. The execution output is Created on Thu Apr 05 22:06:48 PDT 2018 color: yellow filled: true sides (1.0,1.5,1.0) The area is 0.49607837082461076 The perimeter is 3.5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
