SOLID Principles – Part 02 – Single Responsibility Principle
Principle A class should only have a single responsibility. E.g. If it’s a logging class it should only do logging. If it’s a payments class it should only do payments, and so forth. A class should only have one reason to change. Scenario To demonstrate SRP I will use an E-Commerce example. A customer has … More SOLID Principles – Part 02 – Single Responsibility Principle