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 is byval and byref? What are differences between them?

2148


What are different oops concepts?

999


Can we override main method?

1120


Why do we use class?

1020


Which language is not a true object oriented programming language?

1061


why reinterpret cast is considered dangerous?

2334


What is super in oop?

1085


Describe these concepts: Polymorphism, Inheritance and Abstraction.

1138


is there any choice in opting subjects like 4 out of 7

2131


What is multilevel inheritance explain with example?

1084


What is overriding in oop?

992


What is the diamond problem in inheritance?

1072


What is the oops and benefits of oops programming?

924


what is difference between class template and template class?

2596


What is the problem with multiple inheritance?

1094