1 SRP (Single Responsibility Principle):
Each class in your system should have a single responsibility. However, what exactly constitutes a responsibility. It is very subjective; different developers might have different definition of a “single responsibility.” A more practical definition is that there should only be one reason for a class to change. See the example below, where the
Employee class has three methods. Each method has a separate reason for change; thus, three different reasons to change the
Employee class, which violates the SRP.