What are the different forms of polymorphism??
Answer Posted / mms zubeir
Though there are many answers which are all true to some
extent, I would like to conclude all these into two broad
categories:
1. Ad-hoc polymorphism
2. Parametric polymorphism
As the meaning of the names themselves suggests their usage.
If the range of actual types that can be used is finite
and the combinations must be specified individually prior
to use, it is called Ad-hoc polymorphism.
If all code is written without mention of any specific type
and thus can be used transparently with any number of new
types, it is called parametric polymorphism.
Is This Answer Correct ? | 5 Yes | 3 No |
Post New Answer View All Answers
write a code for this:trailer recordId contains a value other than 99, then the file must error with the reason ‘Invalid RECORD_ID’(User Defined Exception).
Why is polymorphism used?
Why do we need oop?
Whats is abstraction in oops?
Describe these concepts: Polymorphism, Inheritance and Abstraction.
What type of loop is a for loop?
What is overriding vs overloading?
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 are oops functions?
What is class and object in oops?
Can we override main method?
What are the benefits of interface?
What is new keyword in oops?
What is the use of oops?
i am getting an of the type can not convert int to int *. to overcome this problem what we should do?