Skip to content

ArjunSingh13/SOLID-Principes-CPP

Repository files navigation

SOLID-Principes-CPP

SOLID Principles explained using CPP language

Five Principles are:

  1. Single Responsibility Principle: Every Software Component should have one and only one reason to change. Aim for high cohesion and loose coupling.
  2. Open Closed Principle: Software components should be closed for modification, but open for extension.
  3. Liskov Substitution Principle: Objects should be replacable with their sub types without affecting the correctness of the program.
  4. Interface Segregation Principle: No client should be forced to depend on methods it does not use.
  5. Dependency Inversion Principle: High-level modules should not depend on low-level modules. Both should depend on abstractions. Abstractions should not depend on details. Details should depend on abstraction.

There are 5 header files each explaining one of the five SOLID Principles with the help of examples and comments. There is first bad implementation example given and then with the help of comments it is explained how it can be improved according to SOLID Principles.

Note : SOLID Principles complement each other and work together in unison to achieve the common purpose of well designed software.

About

SOLID Principles explained using CPP language

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages