SRP, the Single Responsibility Principle, has its canonical statement as the following:
“THERE SHOULD NEVER BE MORE THAN ONE REASON FOR A CLASS TO CHANGE.”
This is all well and good. But consider the following:
1) A class that has more than one reason to change violates SRP.
2) A class that has more than one function has more than one reason to change.
3) A class that has more than one function violates SRP.
Or:
1a) A class that has more than one reason to change violates SRP.
2a) A class that has more than one property has more than one reason to change.
3a) A class that has more than one property violates SRP.
Now, almost anyone who accepts SRP would reject 3 or 3a (there’s always some nutjob out there, so ‘almost anyone’.).
But, 1-3 and 1a-3a are valid arguments. Therefore, 2 and 2a must be rejected as false.
The problem is explaining exactly why they are false.
Why are they false?