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

write a program that takes input in digits and display the result in words from 1 to 1000

2430


What is debug class?what is trace class? What differences are between them? With examples.

2198


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

2143


What is encapsulation oop?

1043


What is class and object with example?

1134


What is oops and its features?

1084


What is oops concept with example?

1026


What is polymorphism and types?

1107


Who invented oop?

1133


What are the 3 principles of oop?

1123


How do you define a class in oop?

1126


Can an interface inherit a class?

1067


What is class and example?

1186


What is the difference between inheritance and polymorphism?

1114


Is this job good for future? can do this job post grduate student?

2165