Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

polymorphism

Former Member
0 Likes
3,924

hello all

is the below statement correct about Polymorphism ?

" Search for the right implementation of a method is carried out by the user "

thnx....

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,859

It is both.

40 REPLIES 40
Read only

Former Member
0 Likes
180

Sorry guys I don't know whats the meaning of Polymorphism, or morphopho..... forget it!

In Object oriented terms, or in even simpler terms, I believe that Polymorphism is the ability of a method or a function to represent a wide range of functionalities. And "Which functionality?" is answered by the user right? Only then the system can search for that functionality!! Right?.

And also, as we all know, the initial form of polymorphism in OOP was represented by function overloading, where, say a postbox is accessed for two functionalities: 1) Posting letter, and 2) collecting letters for delivery.

"Which functionality?" is decided by the user right? He does so by providing the correct parameters:

1) When he wants to post a letter, he calls it this way:

postbox(letter); //sorry to use little 'c' here.

2) When he wants to collect the letters, he calls it this way:

bag = postbox(key);

I don't understand why the statement -- " Search for the right implementation of a method is carried out by the user " should be wrong!