# S.O.L.I.D Principles

Violating DRY in code  ??

![](/files/q3jDIXi3VKdyRAEYvHow)

**S.O.L.I.D** is an acronym for the **first five object-oriented design(OOD) principles** .These principles, when combined together, make it easy for a programmer to develop software that are easy to maintain and extend. They also make it easy for developers to avoid code smells, easily refactor code, and are also a part of the agile or adaptive software development.

1. ***S***&#x52;P The Single Responsibility Principle: — a class should have one, and only one, reason to change, meaning that a class should have only one job.
2. ***O***&#x43;P The Open Closed Principle: — you should be able to extend a class’s behavior, without modifying it.
3. ***L***&#x53;P The Liskov Substitution Principle: — If any module is using a Base class then the reference to that Base class can be replaced with a Derived class without affecting the functionality of the module.
4. ***I***&#x53;P The Interface Segregation Principle: — make fine grained interfaces that are client specific.
5. ***D***&#x49;P The Dependency Inversion Principle — depend on abstractions not on concrete implementations.

Video Playlist  : <https://youtube.com/playlist?list=PL9sRG84iY01HXb8BiMghlGG0VH_tENssx>

Reference  : &#x20;

* Github repo <https://github.com/wtvamp/ThemeParkSOLIDApp>
* Each Branch of the repository is a Implementation


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://harshityadav95.gitbook.io/system-design/s.o.l.i.d-principles.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
