The first principle of the SOLID stack is the Single Responsibility Principle. Following Martin's definition, the principle says:
A class should have only one reason to change.
The attribution of single responsibility leads to misunderstanding this principle. In fact it is often mistakenly taken to mean that a class should only do one thing. The definition of the principle, however, states that the only reason for which a class or object should be changed is because it has changed its responsibility. So, it is not true that an object can only do one thing, rather it can do more things that belong to the same responsibilities. In other words, the actions assigned to an object must be consistent with the unique responsibility that was given. If there are two different reasons why an object or class must be changed, then we have to separate the two responsibilities into as many objects or classes.
Let's look at a practical example of this principle by introducing...