Polymorphism – Define In Just Two Sentences [closed]

Polymorphism allows the expression of some sort of contract, with potentially many types implementing that contract (whether through class inheritance or not) in different ways, each according to their own purpose. Code using that contract should not(*) have to care about which implementation is involved, only that the contract will be obeyed.

(*) In the ideal case, anyway – obviously quite often the calling code has chosen the appropriate implementation very deliberately!

Leave a Comment