/SOLID-principles-kotlin

Examples of SOLID principles in Kotlin

Primary LanguageKotlin

SOLID principles in Kotlin

Examples of SOLID principles in Kotlin

Single Responsibility

  • Entities should only have one reason to change

View example

Open Closed Principle

  • Entities should be open for extension, but closed for modification

View example

Liskov Substitution Principle

  • Derived classes must be substitutable for their base classes

View example

Interface Segregation Principle

  • Clients should not be forced to program against interfaces they do not use

View example

Dependency Inversion Principle

  • Program to an interface, not an implementation

View example