What is polymorphism? Explain with an example.

Answers were Sorted based on User's Feedback



What is polymorphism? Explain with an example...

Answer / kris_kamatoy

The word “polymorphism” means “different forms”. Applied in
object-oriented
paradigm it means the ability of an entity to exhibit
different forms at runtime.

Is This Answer Correct ?    3 Yes 0 No

What is polymorphism? Explain with an example...

Answer / sudarsan

polymorphism means is set of different kind of behaviours.
poly means "many" morphism means "form"... example just
imagine a man.. a man behaviour is not same with his wife
and his mother.. he behave differ with his wife.. he may
behave differ with his mother.. so he cannot behave his
mother like his wife...
same function
but
different behavior.

Is This Answer Correct ?    2 Yes 0 No

What is polymorphism? Explain with an example...

Answer / 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

What is polymorphism? Explain with an example...

Answer / 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

What is polymorphism? Explain with an example...

Answer / dharmendra rai

The concept of polymorphism can be explained as "one interface, multiple methods".

Is This Answer Correct ?    2 Yes 0 No

What is polymorphism? Explain with an example...

Answer / abdul vakeel

beatiful example for polymorphism.....
A boy stat LOVE with the word FRIENDSHIP....and girl ends
her LOVE with same word FRIENDSHIP..in this the word is same
...but attitude is different...this is called polymorpic
behaviour........

Is This Answer Correct ?    2 Yes 0 No

What is polymorphism? Explain with an example...

Answer / abdul vakeel

Having the same name but different forms is the polymorphism....
beatiful example for polymorphism.....
A boy start LOVE with the word FRIENDSHIP....and girl ends
her LOVE with same word FRIENDSHIP..in this the word is same
...but attitude is different...this is called polymorpic
behaviour........

Is This Answer Correct ?    2 Yes 0 No

What is polymorphism? Explain with an example...

Answer / santosh wavare

Polymorphism is one of the important feature of OOP's. It
consist of 2 words i.e., 'Poly' which stands for many
and 'Morphism' stands for forms.

We can divide the polymorphism into 2 types.
1. Static polymorphism
2. Dynamic polymorphism

Static polymorphism:- In this the binding is taken place in
compile time. The different types of static polymorphism
are:-
a) Function Overloading
b) Operator Overloading

Dynamic polymorphism:- In this the binding that takes place
at run-time. The difference types of dynamic polymorphism
are:-
a) Virtual function
b) Abstract class

Is This Answer Correct ?    2 Yes 0 No

What is polymorphism? Explain with an example...

Answer / shiny

The meaning of Polymorphism is something like one name many forms. Polymorphism enables one entity to be used as as general category for different types of actions. The specific action is determined by the exact nature of the situation. The concept of polymorphism can be explained as "one interface, multiple methods".

Is This Answer Correct ?    2 Yes 1 No

What is polymorphism? Explain with an example...

Answer / vivek

Ploymorphism is the concept of OOP's. It allows you invoke
derived class methods through base class reference during
runtime.

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More OOPS Interview Questions

What is pointer in oop?

0 Answers  


This program numbers the lines found in a text file. Write a program that reads text from a file and outputs each line preceded by a line number. Print the line number right-adjusted in a field of 3 spaces. Follow the line number with a colon, then one space, then the text of the line. You should get a character at a time and write code to ignore leading blanks on each line. You may assume that the lines are short enough to fit within a line on the screen. Otherwise, allow default printer or screen output behavior if the line is too long (i.e., wrap or truncate). A somewhat harder version determines the number of spaces needed in the field for the line numbers by counting lines before processing the lines of the file. This version of the program should insert a new line after the last complete word that will fit within a 72-character line.

0 Answers  


Can we call a base class method without creating instance?

6 Answers  


What is abstraction and encapsulation?

0 Answers  


Write 7 differences between "Public" function and "Private" function?

2 Answers   IBM, Wipro,






What is difference between class and object with example?

0 Answers  


what is the application of oops?

8 Answers   IBM,


How do you achieve polymorphism?

0 Answers  


What are the advantages of polymorphism?

0 Answers  


explain the concepts of oops?

1 Answers  


can main method be overloaded...??? How..????

2 Answers   Satyam,


What do you mean by pure virtual functions?

8 Answers  


Categories