WBTP: Triangle classification by angles
Control Flow Diagrams
First, you will draw control flow diagrams for the following methods: isValidTriangleAngle
and getTriangleTypeAngle
. Calculate the cyclomatic complexity of each method. You may consider using https://www.draw.io.
Writing White Box Test Cases
Using your now updated TriangleClassificationTest.java, you should add 10 test cases to the test class: five test cases for isValidTriangleAngle
and five test cases for getTriangleTypeAngle
. Your test cases must be non-redundant, repeatable, and specific! Non-redundant means that each test case should correspond to a unique error condition or a unique combination of valid inputs. Be sure to consider paths through the code, equivalence classes, and boundary values when designing your test cases.
Run the test cases on the given TriangleClassification program, and fix the program until all your test cases pass. (You may need to modify your control flow graph as you edit your program).