Polymorphism

Polymorphism is one of the most important features offered by the object-oriented paradigm. Polymorphism comes from the Greek term "polymorphos" meaning "having many forms." In object-oriented programming, it refers to the ability of the language to process object differently depending on their class (Webopedia at http://www.webopedia.com).

Szyperski [Szy99] defines polymorphism as "the ability of something to appear in multiple forms, depending on the context; the ability of different things to appear the same in a certain context." Essentiality the concept of polymorphism has to do with substitutability between objects; in certain contexts, one object could be substituted with another.

In order to better understand the concept of polymorphism, another related concept should be introduced: The concept of interface.

0 0

Post a comment