Tell me real world example of polymorphism and encapsulation .

Answer Posted / sp

Polymorphism can be considered as a Married man. Who acts
differently in different situation , he acts as a son to
his father and the same person acts as father to his
son .That is he plays , different roles in different
environment.

Is This Answer Correct ?    120 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is heap sort stable?

483


What are the main differences between the linked list and linear array?

520


Define double linked list?

562


Differentiate between iterator and listiterator.

621


Why linked lists are better than arrays?

512






What is the difference between set and unordered_set?

445


Why do we need searching algorithms?

606


Is linked list faster than array?

475


What is merge sort in daa?

482


Can we create a null as a key for a map collection?

509


What is height balanced tree?

500


What is fibonacci search?

594


When should structures be passed by values or by reference?

564


How would you reverse the characters of an array?

523


Does hashmap maintain insertion order?

489