Greetings! Today, we're going to demystify the crucial terms of Object-oriented programming (OOP): Inheritance and Polymorphism. These concepts form the backbone of efficient OOP. Our journey will unfold as follows: we'll start with an intuitive grasp of Inheritance and its implementation in Kotlin, and then we'll delve into Polymorphism, with a special focus on method overriding.
Inheritance is akin to repurposing an old blueprint to create something new. In OOP, it allows one class to inherit features (properties and functions) from another.
In Kotlin, we have the Parent Class (also known as Superclass), which provides features, and the Child Class (or Subclass), which receives these features. When implementing, we use the open keyword for the Parent Class (to allow inheritance), and the : symbol for the Child class indicates which Parent class the features are coming from.
