Size Metrics § LOC – Lines of Code Metric. All lines that are not comments. Including lines of a single brace or parenthesis. § eLOC (effective Lines of Code) Metric. All lines that are not comments, blanks or standalone braces or parenthesis. § lLOC (logical Lines of Code) Metric. These statements are terminated with a semi- colon. The control line for the "for" loop contain two semi-colons but accounts for only one semi colon.
Function Metrics Cyclomatic Complexity = Conditional_Nodes + 1 // CC = 3 + 1 = 4 (Condition nodes are 1,2 and 3 nodes) i = 0; n=4; while (i<n-1) { j = i + 1; while (j<n) { if (A[i]<A[j]) swap(A[i], A[j]); } i=i+1; }
Stable Dependency Principle (SDP) § Every dependency between modules should terminate on a module whose Instability is less than or equal to the depending module's Instability. § Every dependency between modules should terminate on a module whose Abstractness is greater than or equal to the depending module's Abstractness.
Fall 2020 Disclaimer. These slides can only be used as study material for the class CSE460 at ASU. They cannot be distributed or used for another purpose.