Do you agree with this C++ exam question…Polymorphism and virtual functions are the same concept?

I marked it false but it was marked incorrect. because I feel that Virtual functions implement the concept of polymorphism. So should I challange the question?

6 Comments

  1. kaayla says:

    Yes

  2. KeElp says:

    Hmm I would politely ask the teacher about the question. I believe you are correct in saying that “Virtual functions implement the concept of polymorphism.”

  3. poorcocoboiboi says:

    They’re not the same thing: virtual functions are used to define an INTERFACE for a class, where polymorphism is an expression of the INHERITANCE of those interfaces into actual functionality.

  4. Ahmed The Ninja says:

    Third poster is wrong.

    Polymorphism and virtual functions is the same concept.

    Polymorphism – determine the function called at run-time based on the specific class that implements the interface.

    Virtual Function – function marked for dynamic binding to be resolved at run-time (based on the class that implements it). Don’t challenge the question because you will lose.

  5. sangreviento says:

    I would definately ask the teacher about it, at least have them explain it to you as I would agree.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Powered by Yahoo! Answers