Design Metrics

Web Sites

  • http://www.objectmentor.com/resources/articles/oodmetrc.pdf

Products & Utilities

Feature Matrix

  • LOC – Lines of Code; a better measure is ESLOC or # of statements
    SUMS – number of packages, classes, methods, public methods
    CC – Cyclomatic Complexity (McCabe)
  • WMC – Weighted Methods per Class = sum of complexities of methods in a class; it could also be the number of methods per class
  • RFC – Response for a Class = number of methods invoked in response to a message sent to an object
  • LCOM – Lack of Cohesion of Methods measures dissimilarity of methods in a class according to attributes ( LCOM = ( (1/A sum(m(a[j]), j=1..A)) – M ) / (1-M) , where M = # methods, A = # attributes, m(a[j]) is the number of methods which reference the jth attribute)
  • CBO – Coupling Between Object Classes = a count of the other classes to which a class is coupled
  • DIT – Depth of Inheritance Tree
  • NOC – Number of Children (direct extensions only)
Product ESLOC SUMS CC WMC RFC LCOM CBO DIT NOC Comments
JMetric x x x x x x x x
JNCSS x x
RSM x x x x x
JDepend x Counts dependencies, level of abstractness, level of stability.
jLint x No metrics; Instead analyses code for common errors (like c’s lint)

Other Pages about Metrics

It's only fair to share...
Share on Facebook
Facebook
Tweet about this on Twitter
Twitter
Share on LinkedIn
Linkedin

Leave a Reply