Single Responsibility Principle — S of SOLID
2 min readAug 6, 2021
The Single Responsibility principle states that any software entity (class, method) should have only one responsibility assigned to it. If you are in any doubt on whether should you change a class or a method code, the only thing you need to do is ask the following two questions and if the answer is yes, then you need to change that particular class code/method code.
- Does the class or…