Single Responsibility Principle
A class should have only one reason to change. It means a class should have only one task to perform. This means that if a class is a data container, like a Book class or a Student class, and it has some fields regarding that entity, it should change only when we change the data…
