Answer Posted / mms zubeir
There are two types of polymorphism.
1. Adhoc polymorphism (Overloading, templates).
2. Parametric polymorphism(Overriding).
If the behaviors are finite and known before its usage, it
is adhoc polymorphism. These bindings are done at
compilation itself and hence called compile time binding.
If the behaviors are infinite and known only at run time at
the time of use, it is parametric polymorphism. These
binding can be mapped at run time only and hence sometimes
referred as run time binding.
Note:- Virtual mechanism is used to resolve conflicts in
overriding polymorphically. Virtual mechanism itself
doesn't provide any polymorphism rather the overriding
leads to run time polymorphism.
Is This Answer Correct ? | 4 Yes | 7 No |
Post New Answer View All Answers
What is format for defining a structure?
what is Loop function? What are different types of Loops?
What are the different types of polymorphism in c++?
When is dynamic checking necessary?
What is a node class in c++?
Must accepts "Maestro Cards" Tax for bike should be less than 15 Total number of lanes is more than 10 Must provides monthly pass Write a method: boolean isGoodTollBridge(String[] cardsAccepted, String[] tollTax, boolean hasMonthlyPass, int numberOfLanes); String[] cardsAccepted A String array of names of card types accepted for payment of toll tax, it can be null if the toll does not accept any card String[] tollTax A String array of toll tax chart (say “Train : 300â€Â,â€ÂBullCart : 10â€Â) boolean hasMonthlyPass This parameter defines whether there is any monthly pass available or not int numberOfLanes This parameter defines the number of lanes for each side
Explain class invariant.
what kind of projects are suitable for c and c++
What language does google use?
Difference between struct and class in terms of access modifier.
How would you implement a substr() function that extracts a sub string from a given string?
What is the purpose of the "delete" operator?
What does the following do: for(;;) ; a) Illegal b) Loops forever c) Ignored by compiler...not illegal
What is the use of object in c++?
Can I learn c++ without knowing c?