Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

1. DRY (Don’t Repeat Yourself)

Inheritance:

Interfaces:

Methods:

2. KISS (Keep It Simple, Stupid)

Clarity:

Minimal Complexity:

Additional Simplifications:

  • Instead of creating a separate method for printing object fields, the ToString() method is overridden in BaseMoney and Product classes.

3. S - Single Responsibility Principle (SOLID)

Each class has one responsibility:

4. O - Open/Closed Principle (SOLID)

Extensibility without modifying existing code:

  • Currency handling logic can be extended by adding new classes (USDMoney, CryptoMoney) without changing BaseMoney.
  • New logging types can be added by implementing IWarehouseOperationLogger without modifying Warehouse.

5. L - Liskov Substitution Principle (SOLID)

The base class can be replaced by its subclass without changing behavior:

6. I - Interface Segregation Principle (SOLID)

Interfaces are clearly divided and do not contain unnecessary methods:

7. D - Dependency Inversion Principle (SOLID)

Dependencies are used through interfaces:

About

Software design principles and patterns

Resources

Stars

1 star

Watchers

1 watching

Forks

Used by

Contributors

Languages