Design Pattern
SOLID Single Responsibility There should not be more than one reason for a class to change. Class provides focused responsibility. Questions - What is this class supposed to do ? And what this class is doing? Open Closed Software Entities(Classes, Modules, Methods etc.) should be open for extension, but closed for modification. We should be able to extend the existing behaviour. Whatever is already written should not be change, we should not be modifying the code written in base class. Liskov Substitution We should be able to substitute base class objects with derived class object & this should not alter behaviour/characteristics of program. Ex - Extending Rectangle to create Square. Interface Segregation Clients should not be forced to depend upon the interface that they do not use. Interface Pollution - No large interfaces, Unrelated, Classes have empty method implementations. Method implementations throw UnsupportedOperationException (or ...