As we described earlier, overriding occurs when a child class changes
the meaning of a function originally defined in the parent class.
-
Different child classes can override in different ways.
-
Parent class can have default behavior, child classes alternatives.
-
Contributes to code sharing.
-
Ensures common interfaces.