Browse Source

alle möglichen Dreiecke eingefügt und Test jetzt für alle Fälle positiv

master
Sarah Baumann 2 years ago
parent
commit
d5ec8f0e9d
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      src/TriangleChecker.java
  2. 1
    1
      test/TriangleCheckerTest.java

+ 1
- 1
src/TriangleChecker.java View File

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;

+ 1
- 1
test/TriangleCheckerTest.java View File

// 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);

Loading…
Cancel
Save