The Single Responsibility Principle states that every module, class, and function should be responsible for a single functional objective. There should be only one reason to make any changes.
The benefits of this principle are listed here:
- The programmer can focus on a single context during development.
- The size of each component is smaller.
- The code is easier to understand.
- The code can be tested more easily.