Single Responsibility Principle

From JholJhapata
Revision as of 18:37, 13 August 2019 by Admin (talk | contribs) (Created page with "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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.