The Single Responsibility Principle keeps each class cohesive around one primary responsibility. A clear responsibility makes a class easier to use and maintain because its methods and instance variables serve one purpose. section 2.3.1
A cohesive book catalogue
A Book stores a book’s title and author attributes. A Catalogue maintains Book objects, adds new books, and finds matches. The separation keeps book data distinct from collection management and searching. section 2.3.1
Apply the principle by checking whether a class has a single, recognizable purpose:
- Use later design principles to manage change, delegation, coupling, extension, interfaces, and duplication without creating unnecessary complexity. section 2.4






