Abstraction

Process of hiding implementation details and showing only functionality to user.

Implemented by

Abstract components like Interfaces and Abstract Classes.

How do interface and Abstract class achieve abstraction?

If you're returning an object through an API, you simply pass them an object of the interface, not the class.

The class(implementation) is useless information, the interface is all the consumer will need.

References


Children
  1. Leaky Abstractions

Backlinks