Raidline / Solid-Training

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SOLID Training Project

This project is a practical training on the SOLID principles in Java. It contains examples and exercises for each of the five principles: Single Responsibility, Open-Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion.

Table of Contents

  1. Single Responsibility Principle (SRP)
  2. Open-Closed Principle (OCP)
  3. Liskov Substitution Principle (LSP)
  4. Interface Segregation Principle (ISP)
  5. Dependency Inversion Principle (DIP)

Single Responsibility Principle

The Single Responsibility Principle states that a class should have only one reason to change. This means that a class should only have one job or responsibility.

Go to SRP Examples and Exercises

Open-Closed Principle

The Open-Closed Principle states that software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification.

Go to OCP Examples and Exercises

Liskov Substitution Principle

The Liskov Substitution Principle states that in a computer program, if S is a subtype of T, then objects of type T may be replaced with objects of type S without altering any of the desirable properties of the program.

Go to LSP Examples and Exercises

Interface Segregation Principle

The Interface Segregation Principle states that no client should be forced to depend on interfaces they do not use. This principle deals with the disadvantages of "fat" interfaces.

Go to ISP Examples and Exercises

Dependency Inversion Principle

The Dependency Inversion Principle states that high-level modules should not depend on low-level modules. Both should depend on abstractions. Additionally, abstractions should not depend on details. Details should depend on abstractions.

Go to DIP Examples and Exercises

About


Languages

Language:Java 100.0%