Lack Of Cohesion Of Methods 3 (LCOM3)

Description:

Measures the dissimilarity of methods in a class by its attributes.

Consider:
m - number of methods in a class
a - number of attributes in a class
mA - number of methods that access an attribute
EmA - sum of mA for each attribute

Then:
RESULT = 100*(EmA/a-m)/(1-m)

The definition of this metric was proposed by Henderson-Sellers in 1995. A low value indicates good class subdivision, implying simplicity and high reusability. A high lacking of cohesion increases complexity, thereby increasing the likelihood of errors during the development process.