Created by: Christopher Arcos (@ArcosChris)
This repository was created to simplify the SOLID Principles. This should not be used as the only source since I am still learning, but it could be useful to anyone out there who feels a bit stuck with these topics. I am not a teacher or instructor this is just based on information I have learned.
In this repository there are different packages in /src/com/solidprinciples.
The different packages have information for the different principles in SOLID.
-
SRP - Single Responsibility Principle
- States that a class should only have one reason to change, meaning it should only have one responsibility
-
OCP - Open/Closed Principle
- States that software entities (classes, modules, functions, etc.) should be open for extension but closed for modification.
- Existing code should not be modified, but it should be possible to add new functionality without changing the existing code
-
LSP - LISKOV SUBSTITUTION PRINCIPLE
- States that object of a superclass should be able to be replaced with objects of a subclass without altering the correctness of the program.
-
ISP - INTERFACE SEGREGATION PRINCIPLE
- States that a class should not be forced to implement interfaces it does not use.
-
DIP - DEPENDENCY INVERSION PRINCIPLE
- States that high-level modules should not depend on low-level modules, but both should depend on abstractions.