PrepAway - Latest Free Exam Questions & Answers

What Object-Oriented Programming concept does this illustrate?

An object acts differently, depending on the context of the input message. What Object-Oriented Programming concept does this illustrate?

PrepAway - Latest Free Exam Questions & Answers

A.
Delegation

B.
Inheritance

C.
Polyinstantiation

D.
Polymorphism

Explanation:
Answer D is correct; polymorphism (based on the Greek roots poly and morph, meaning many and forms, respectively): allows the ability to overload operators, performing different methods depending on the context of the input message.

Incorrect Answers and Explanations: A, B, and C: Answers A, B, and C are incorrect. Delegation allows objects to delegate messages to other objects. Inheritance means an object inherits capabilities from its parent class. Polyinstantiation means many instances, two objects with the same names that have different data.

One Comment on “What Object-Oriented Programming concept does this illustrate?

  1. joe says:

    polymorphism (based on the Greek roots poly and morph, meaning many and forms, respectively): allows the ability to overload operators, performing different methods depending on the context of the input message.




    0



    0

Leave a Reply