I know of three ways in which SRP helps reduce coupling. Are there even more? [closed]
- by user1483278
I'd like to figure all the possible ways SRP helps us reduce coupling. Thus far I can think of three:
1) If class A has more than one responsibility, these responsibilities become coupled and as such changes to one of these responsibilities may require changes to other of A's responsibilities.
2) Related functionality usually needs to be changed for the same reason and by grouping it togerther in a single class, the changes can be made in as few places as possible ( at best changes only need be made to the class which groups together these functionalities)
3) Assuming class A performs two tasks ( thus may change for two reasons ), then number of classes utilising A will be greater than if A performed just a single task ( reason being that some classes will need A to perform first task, other will need A for second task, and still others will utilise it for both tasks ).This also means that when A breaks, the number of classes ( utilising A ) being impaired will be greater than if A performed just a single task.
Can SRP also help reduce coupling in any other way, not described above?
Thank you