Talk:Polymorphism in object-oriented programming
From Wikipedia, the free encyclopedia
Contents |
[edit] Older comments
I would say that being able to respond to method calls by their names is only a consequence of polymorphism, and is caused by the methods being virtual. Polymorphism is the ability of treating objects of classes also as objects of all their superclasses, in all aspects (thus being able to use their members such as methods). —Preceding unsigned comment added by Balrog-kun (talk • contribs) 29 March 2006
- Actually, it's the other way around. What you're describing is called inheritance, and polymorphism is a consequence of inheritance. All systems using inheritance are polymorphic, but not all polymorphic systems use inheritance (in Smalltalk you can use inheritance, but it's not necessary), or even have the concept of "class" (like Self or Javascript which are based on prototypes instead of classes).--Cynebeald (talk) 17:44, 23 January 2008 (UTC)
polymorphism manupulates data.
Is it true that one can program the system to jump over clssses i.e., I want some data but not all from each class, cub class, partial class, and supr class however, I do not want to have to search each class thereby slowin g down my processing power or taking up more processor power therteby slowing down my time to transmit. I want to <Get> data fro the Class and the supper class by settin g pointrs skipping the sub and partial clases using if then statem e In nts. If this x in class skip to super c;ss and <get> data and <send>. This is imperative for keeping real time systems.
Thoughts,
Mike
Mike_Benso@yahoo.com
—Preceding unsigned comment added by 69.136.233.19 (talk) 11 December 2006
[edit] short description
polymorphism as such has nothing to do with inheritance. Polymorphism means than objects that implement the same method name can be exchanged. The definition given seems to stem from static typing. —Preceding unsigned comment added by 89.62.63.186 (talk) 13 February 2007
[edit] #include <vector>
is the #include <vector> even necessary? Maybe I didn't read it well enough, but it seems an array is being used not a vector - CKL —Preceding unsigned comment added by 71.210.245.151 (talk) 3 July 2007
[edit] VB.NET Example
Why is this using interfaces rather than inheritance which all the other OO examples use? This make the examples inconsisteny in what they are actually doing. Surely it would be better for consistency to show the inherited example with the interface one as an extenison of this. —Preceding unsigned comment added by 81.133.167.102 (talk) 16:42, 14 December 2007 (UTC)
[edit] Java Example
The Java example is dealing with Shapes, while all the other examples are dealing with Animals. —Preceding unsigned comment added by 199.26.230.102 (talk) 16:04, 20 December 2007 (UTC)
- I converted the C++ version to Java and added it to the article in place of the Shapes example. I forgot to log in, though, so it shows up as my IP. --Powerlord (talk) 06:19, 26 February 2008 (UTC)
[edit] Java Section
This is just the concept of Inheritance and does not show polymorphism? Please email your response to siu02rk@hotmail.com
Thanks
90.211.234.107 (talk) 10:08, 19 May 2008 (UTC)