Count the disjoint sets produced from the intersection of the sets of attributes used by the methods. High cohesion indicates good class subdivision. Lack of cohesion or low cohesion increases complexity, thereby increasing the likelihood of errors during development. Classes with low cohesion could probably be subdivided into two or more subclasses with increased cohesion. Classes are coupled when methods declared in one class use methods or attributes from the other classes.
Inheritance introduces significant tight coupling between superclasses and their subclasses.
Since good OO design requires a balance between coupling and inheritance, coupling measures focus on non-inheritance coupling. The next OO metric measures coupling strength. CBO is a count of the number of other classes to which a class is coupled. It is measured by counting the number of distinct noninheritance-related class hierarchies on which a class depends. Excessive coupling is detrimental to modular design and prevents reuse.