Question: Cyclomatic Complexity & Independent Path Testing Directions: Compute the Cyclomatic Complexity for the following program segment. For the code: 1) find a set of independent

 Cyclomatic Complexity & Independent Path Testing Directions: Compute the Cyclomatic Complexity

Cyclomatic Complexity & Independent Path Testing Directions: Compute the Cyclomatic Complexity for the following program segment. For the code: 1) find a set of independent paths, and 2) generate a set of test cases that ensure that each of the independent paths is executed. Note: The line numbers to the left of each line specify the node of the flow graph to which the statement belongs. 1: 2: 2: 3 3: 4: 4: 5: 5 6: 6: 7: 8: 8: 9: 9 WHILE (not End of File) Read Record; IF (Record.F1 == 0) Total += Record.F1; Counter++; ELSE IF (Record.F2 == 0) Print Total, Counter; Counter = 0; ELSE Total -= Record.F2; END IF END IF Print "END Record" END WHILE Print Counter

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!