What does it mean for a method in C++ to be virtual? Any class that contains the
ID: 3578798 • Letter: W
Question
What does it mean for a method in C++ to be virtual?
Any class that contains the virtual method is an abstract class and cannot be instantiated.
It employs dynamic dispatch (i.e., it is polymorphic).
Only its declaration appears in the .h file; its definition is in a separate .cc file.
It must be defined explicitly in every derived class.
Any class that contains the virtual method is an abstract class and cannot be instantiated.
It employs dynamic dispatch (i.e., it is polymorphic).
Only its declaration appears in the .h file; its definition is in a separate .cc file.
It must be defined explicitly in every derived class.
Explanation / Answer
Answer: Option: Any class that contains the virtual method is an abstract class and cannot be instantiated.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.