Single Responsibility Principle

A class should have only one reason to change, meaning that a class should only have one responsibility or job.
Single Responsibility Principle

How does it work?

The principle is intuitively simple, but defies good definitions. Keep a class simple. Don't make it store things, and draw things, and implement all use cases. Each class should just do one of these things.

When should you use it?

  • It helps to build a maintainable system.