Class Triangle
java.lang.Object
Shape
Polygon
Triangle
public class Triangle
extends Polygon
-
Constructor Summary
Constructors Constructor Description Triangle(java.lang.Integer... sides)
Create a new triangle -
Method Summary
Modifier and Type Method Description double
calculateArea()
Calculate area of triangleboolean
isEqulateral()
-
Constructor Details
-
Triangle
public Triangle(java.lang.Integer... sides)Create a new triangle- Parameters:
sides
- sides of triangle
-
-
Method Details
-
calculateArea
public double calculateArea()Calculate area of triangle- Specified by:
calculateArea
in classShape
- Returns:
- area of Shape
-
isEqulateral
public boolean isEqulateral()- Returns:
- returns true if shape is be equilateral
-