return TriangleType.EQUILATERAL; | return TriangleType.EQUILATERAL; | ||||
} | } | ||||
if (a == b || a == c || b == c) { | |||||
if (a==b || a==c || b==c) { | |||||
return TriangleType.ISOSCELES; | return TriangleType.ISOSCELES; | ||||
} | } | ||||
return TriangleType.NORMAL; | return TriangleType.NORMAL; |
// Arrange | // Arrange | ||||
float a = 0; | float a = 0; | ||||
float b = 0; | float b = 0; | ||||
float c = 2; | |||||
float c = 5; | |||||
// Act | // Act | ||||
TriangleChecker.TriangleType type = TriangleChecker.checkTriangle(a, b, c); | TriangleChecker.TriangleType type = TriangleChecker.checkTriangle(a, b, c); |