SOLID Principles With (almost) Real-Life Examples in Java
Each class should have only one sole purpose, and not be filled with excessive functionality. Open-Closed Principle Classes should be open for extension, closed for modification. Interface Segregation Principle Interfaces should not force classes to implement what they can’t do. Dependency Inversion Principle Components should depend on abstractions, not on concretions.