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: WHILE (not End of File) 2: Read Record; 2: IF (Record.F1 == 0) 3: Total += Record.F1; Counter++; ELSE IF (Record.F2 == 0) Print Total, Counter: 5: Counter = 0; ELSE 6: Total = Record.F2; 7: END IF 8: END IF 8 Print "END Record" 9 END WHILE 9 Print Counter 3: 4: 4: 5 6

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!