Introduction
This is the last topic in our discussion on OOP. So far, we have already looked at classes and objects and how we can use classes as blueprints to create multiple objects. We saw how we can use methods to hold the logic of our classes and fields to hold the state. We've discussed how classes can inherit some properties from other classes to allow easy reusability of code.
We've also looked at polymorphism, or how a class can redefine the implementation of a method inherited from the superclass; and overloading, or how we can have more than one method using the same name, as long as they have different signatures. We've also discussed functions or methods.
We've looked at typecasting and interfaces in our previous lesson and how typecasting is a way for us to change an object from one type to another, as long as they are on the same hierarchy tree. We talked about upcasting and downcasting. Interfaces, on the other hand, are a way for us to define generic behaviors that our classes...