Chapter 13

Abstract Classes and Interfaces

Abstraction is an important concept of object-oriented programming.

Humans see and understand things through abstraction. For example, you do not perceive a car as thousands of individual parts. Instead you think of it as a an object with its own unique behavior.

Abstraction allows you to drive a car without having to know the details of its internal mechanisms. If you know to drive a Lamborghini, you can easily drive a Ferrari. But then, internally the engines of a Lamborghini and a Ferrari don’t work the same way. Which means, the behavior does not change from instance to instance but rather it changes between types of an object.

In this chapter, we will learn more about abstraction, polymorphism, abstract classes, and interfaces.