+ 8

Polymorphism real world example? and what is runtime in runtime polymorphism?

22nd Dec 2016, 5:47 PM
chandni singh
chandni singh - avatar
8 ответов
+ 4
let take a human can perform dance ,study, walk and all so these are the property of human that can perform these task and depending on situation what is need at that time. this you can relate with real world.
22nd Dec 2016, 6:33 PM
himanshu yadav
himanshu yadav - avatar
+ 3
for example... lets take a class fruit containing methods to tell color() and shape().... now this class will have many inherited classes such as apple, orange, etc... and each inherited class will have different shape() and color().... so the same methods shape and color are used in different classes in different manner.... that is polymorphism....
24th Dec 2016, 5:46 AM
Aruj Sharma
Aruj Sharma - avatar
+ 3
Polymorphism (Object Oriented) explained better : 1) Father : Son, go and get Red Label. Son : 750 ml or 1 L ? .. 2) Mother : Son, go and get Red Label. Son : 500g or 1 kg ? ... 😂
27th Dec 2016, 11:40 AM
Pushkarr Yelave
Pushkarr Yelave - avatar
+ 1
I just wrote example. You can check it in my codes. "Java Run-Time and Compile Polymorphism" Hope it will help
22nd Dec 2016, 6:46 PM
Marcin Barańczyk
Marcin Barańczyk - avatar
+ 1
Hmm I admit at first I did not get the question. You are serching for real life metaphor for it. I think that runtime polimorphism is just any activity, that looks diffrent depends who is performing it. For example if good dancer is dancing the result is ovations and admiration, but if dancer is clumsy it results in laughter. the same action, different result, depands on performer.
22nd Dec 2016, 7:55 PM
Marcin Barańczyk
Marcin Barańczyk - avatar
- 1
who is the best application in android c++
23rd Dec 2016, 1:19 PM
Puneet Bajpai
Puneet Bajpai - avatar