SLAP — Single Level of Abstraction Principle

By Karol Bocian | March 1, 2020

Single Level of Abstraction Principle

Each code line in the method should have the same level of abstraction. We should not mix high-level with low-level details in one method.

Advantages

  • More readability.
  • Easier to understand

Disadvantages

  • More classes and method.

All posts from mini project: Learn SOLID and OOP principles:

Sources

Main image

Materials