Polymophism
Polymorphism
happens and we can’t avoid it despite its silly sounding
name. We might have a baseclass which represents a
basic document and we might subclass this generate
‘invoices’. A different subclass might generate
‘cheques’. They may both have a method called print but
the implementation of ‘print’ could be entirely
different for the two base classes even though the same
name ‘print’ is used in each case. That’s polymorphism! |