Software Measurement
Prepared by
Md. Shafiuzzaman
Uses of software measurements
• Estimation of cost and effort
• Feedback to improve the quality of design and implementation
Cyclomatic Complexity
• Capture the complexity of a program’s conditional logic
• McCabe’s metric is based on graph theory, in which you calculate the
cyclomatic number of a graph G, denoted by V(G), by counting the
number of linearly independent paths within a program.
where e is the number of edges, n is the number of nodes
Uses of Cyclomatic Complexity
• originally designed to indicate a program’s testability and
understandability
• determine the minimum number of unique tests that must be run to
execute every executable statement in the program
Cohesion & Coupling
• Cohesion is the indication of the relationship within a module
• Coupling is the indication of the relationships between modules
Example of Low and High Cohesion

Software measurement and estimation

  • 1.
  • 2.
    Uses of softwaremeasurements • Estimation of cost and effort • Feedback to improve the quality of design and implementation
  • 3.
    Cyclomatic Complexity • Capturethe complexity of a program’s conditional logic • McCabe’s metric is based on graph theory, in which you calculate the cyclomatic number of a graph G, denoted by V(G), by counting the number of linearly independent paths within a program. where e is the number of edges, n is the number of nodes
  • 5.
    Uses of CyclomaticComplexity • originally designed to indicate a program’s testability and understandability • determine the minimum number of unique tests that must be run to execute every executable statement in the program
  • 6.
    Cohesion & Coupling •Cohesion is the indication of the relationship within a module • Coupling is the indication of the relationships between modules
  • 7.
    Example of Lowand High Cohesion