What is polymorphism? Explain with an example.

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the advantages of inheritance.

677


Hi friends I have experience of 6 months in website design and maintanence. Now i am looking for other IT jobs.. to switch platform. please post any interview you know in chennai.

1794


What is the oops and benefits of oops programming?

558


why reinterpret cast is considered dangerous?

1906


Why is polymorphism used?

588






What is constructor overloading in oop?

607


Why interface is used?

555


Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.

635


What is encapsulation oop?

579


What is an advantage of polymorphism?

599


What is abstraction oop?

626


what is the drawback of classical methods in oops?

2922


What is class encapsulation?

605


write a program to find 2^n+1 ?

1555


• What are the desirable attributes for memory managment?

1731