Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is polymorphism? Explain with an example.

Answer Posted / josh

Polymorphism
Poly means “many” and morph means “form”. In the context of
object-oriented systems, polymorphism means objects that
can take on or assume many different forms. Polymorphism
means that the same operation may behave differently on
different classes.

Polymorphism allows us to write generic, reusable code more
easily, because we can specify general instructions and
delegate the implementation details to the objects
involved. Since no assumption is made about the class of an
object that receives a message, fewer dependencies are
needed in the code and, therefore maintenance is easier.
For example, in a payroll system, manager, office worker,
and production worker objects all will respond to the
compute payroll message, but the actual operations
performed are object specific.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does enum stand for?

1114


Write a program to reverse a string using recursive function?

2337


Why is abstraction needed?

1032


Which is not an object oriented programming language?

982


State what is encapsulation and friend function?

1256


Can main method override?

1104


What is polymorphism in oop example?

1021


What is abstract class in oop?

1002


What are oops functions?

1010


what are the realtime excercises in C++?

2833


What is abstraction with example?

1105


How Do you Code Composition and Aggregation in C++ ?

25451


String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?

2386


How do you answer polymorphism?

1056


to find out the minimum of two integer number of two different classes using friend function

2124