"Life is growth. If we stop growing, technically and spiritually, we are as good as dead.”
– Morihei Ueshiba
Design V – Cohesion and Coupling
Coupling between A and B is defined as:
'if I change element A I also have to change element B [...]
Cohesion of an element A is defined as:
'if I change sub-element A.1, do I have to change all the other sub-elements A.2-n?'
So, cohesion is coupling within an element.
Coupling measures the degree of interdependence between software components. In object-oriented design, we want coupling to be as low as possible, but not lower, or we end up with software that does very little. This allows us to make changes in a component without impacting other ...