Skip to main content

One doc tagged with "polymorphism"

View all tags

Polymorphism: Method Overriding and Duck Typing

We've learned about inheritance and how a child class can inherit attributes and methods from a parent class. Now we're going to explore polymorphism, a powerful concept that allows us to treat objects of different classes in a similar way.