Single Responsibility Principle — S of SOLID

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.

Bulbs are meant to give light only — photo by Rodolfo Clix