Advanced Lesson 2
Advanced Object-Oriented Programming
Chapter 2: Polymorphism
APIE
You might often hear that the four main concepts of OOP can be summarised with the acronym APIE:
- Abstraction
- Polymorphism
- Inheritance
- Encapsulation
I have talked a lot about abstraction already, so there is no need to discuss further. The main takeaway is that you can model your program as high-level objects with properties and methods interacting with each other. There is no need for objects to know the details about how methods are implemented. They only need to know what an object can do.
We have also covered inheritance in Core Lesson 10, where you can extend the features of an object without having to modify its code.