What is polymorphism ? Explain with examples
Answer Posted / ashok kumar
polymorphism means many forms,greekword-poly-many fuction
overloding,fuction overloding,operator overloding.
ex->'+'
this opertor can be overloaded to add strings
(concatenation)or sets(union)and so on. functions also can
be overloaded as show in the next sectin.the
terms 'Overloading'and 'polymorphism' are used
interchangeablely.
| Is This Answer Correct ? | 10 Yes | 3 No |
Post New Answer View All Answers
Why do we use oops?
What is destructor give example?
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.
Why is it so that we can have virtual constructors but we cannot have virtual destructors?
what is the sylabus for priliminaries?
Why do pointers exist?
How do you define a class in oop?
What does and I oop and sksksk mean?
What is oops concept with example?
Why is destructor used?
What is encapsulation example?
There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.
What is the benefit of oop?
Can static class have constructor?
What are main features of oop?