Content deleted Content added
→Low-Coupling / High-Cohesion: rewriting |
→High Cohesion: start new paragraph |
||
Line 49:
If we want to design classes to increase the likelihood of reuse and not be overwhelmingly complex, keeping complexity manageable, the solution is assigning responsibilities so that cohesion remains high.
Cohesion is a measure of how strongly related and focused the responsibilities of a single class are.
Cohesion is decreased when: *The responsibilities (operations) of a class have little in common.
|