Single Responsibility Principle

From JholJhapata
Revision as of 17:01, 14 August 2019 by Admin (talk | contribs)

Single Responsibility Principle states that one class should only serve one purpose, it does not mean that each class should have only one method or property but they should all relate directly to the responsibility of the class.

When a class serves multiple responsibility/purposes then we should separate it into different classes.