This is an archived version of the course. Please find the latest version of the course on the main webpage.

Chapter 2: Polymorphism

APIE

face Josiah Wang

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.