What is polymorphism ? Explain with examples
Answer Posted / khushpreet kaur.
Polymorphism is taken from the greek word which means "many
forms"...
So polymorphism means "to carry out operations of
different processing steps by function having same
messages".
when a base class member function can be overridden by
defining a derived class member function with same name as
that of the base class member function,then such type of
concept is called "Polymorphism".(one interface multiple
methods)
polymorphism is of two types- compile time(early or static
binding) and run time(dynamic or late binding)..
in comlite time is of two types-function overloading and
operator overloading.
in run time is of two types-virtual function and pure
virtual function..
| Is This Answer Correct ? | 11 Yes | 0 No |
Post New Answer View All Answers
What is the point of oop?
Why do while loop is used?
What is meant by oops concept?
What is object in oop?
What is difference between oop and pop?
What is abstract class in oop?
How do you define social class?
What is for loop and its syntax?
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.
What is the difference between encapsulation and polymorphism?
Why oops is important?
What is object in oops?
Why is abstraction needed?
What is the difference between procedural programming and oops?
What is Difeerence between List obj=new ArrayList(); and ArrayList obj=new ArrayList()?