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

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

2122


What are the benefits of interface?

1049


what are the ways in which a constructors can be called?

2125


How do you achieve polymorphism?

1075


What is overloading and its types?

1159


What is destructor in oop?

1024


Who invented oop?

1123


I have One image (means a group photo ) how to split the faces only from the image?............ please send the answer nagadurgaraju@gmail.com thanks in advace...

2104


What is difference between abstraction and encapsulation?

1069


What is oops and why we use oops?

1036


What is new keyword in oops?

1037


What does sksksk mean in text slang?

2108


Why multiple inheritance is not allowed?

1146


Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)

2093


Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box

2609