Object-oriented programming: Difference between revisions

Content deleted Content added
Semantics / usage (colloquial use of religious metaphor rather than clear language is inappropriate in a technical article, indeed in most encyclopaedia entries)
Line 204:
 
===Polymorphism===
[[Subtyping]] – a form of [[polymorphism (computer science)|polymorphism]] – is when calling code can be agnosticindependent as toof which class in the supported hierarchy it is operating on – the parent class or one of its descendants. Meanwhile, the same operation name among objects in an inheritance hierarchy may behave differently.
 
For example, objects of type Circle and Square are derived from a common class called Shape. The Draw function for each type of Shape implements what is necessary to draw itself while calling code can remain indifferent to the particular type of Shape being drawn.