Single Responsibility Principle

Said Olano - Nov 4 '23 - - Dev Community

A class should never have more than one reason to change.

Long version: Every class should have a single responsibility, and that responsibility should be entirely encapsulated by the class.

Responsibility can be defined as a reason to change, so a class or module should have one, and only one, reason to change.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .