0% found this document useful (0 votes)
700 views

CS 2401 Programming Assignment Unit 6 Final

The document provides instructions to draw a flowchart and graph for an algorithm, label the nodes and edges, and then calculates the cyclomatic complexity of the algorithm. It finds there are 22 edges and 19 nodes with 1 exit point in the graph. Using the formula, the cyclomatic complexity is calculated to be 5, and the volume logic index is calculated to be 6.

Uploaded by

Bryan Phone
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
700 views

CS 2401 Programming Assignment Unit 6 Final

The document provides instructions to draw a flowchart and graph for an algorithm, label the nodes and edges, and then calculates the cyclomatic complexity of the algorithm. It finds there are 22 edges and 19 nodes with 1 exit point in the graph. Using the formula, the cyclomatic complexity is calculated to be 5, and the volume logic index is calculated to be 6.

Uploaded by

Bryan Phone
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Q1) Draw the flowchart of the above algorithm

Q2) . Draw the corresponding graph and label the nodes as n1, n2, … and edges as e1,
e2,…

Q3) Calculate the cyclomatic complexity of the above algorithm


By using the formula, Cyclomatic complexity => E – N + 2*P
Edges (E) = 22
Nodes (N) = 19
Exit Point (P) = 1
 22 – 19 + (2 * 1)
3+2
 5 (no. of closed regions)
VLI (G) = no. of closed regions + 1
Hence, VLI (G) = 5 + 1 = 6

You might also like