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 / amit kumar

Poly means “many” and morph means “form”. In the context of
object-oriented systems, it 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 are the important components of cohesion?

1077


Why do we use class?

1146


What is pointer in oop?

1119


What is overloading in oop?

1045


What is multilevel inheritance?

1255


What language is oop?

1072


Prepare me a program for the animation of train

2531


What is polymorphism what are the different types of polymorphism?

1062


How do you use inheritance in unity?

1125


Can private class be inherited?

1222


write a C++ program for booking using constructor and destructor.

2585


What does no cap mean?

1115


What is object in oops?

1121


What is a function in oop?

1135


What are oops functions?

1075