PrepAway - Latest Free Exam Questions & Answers

What Object-Oriented Programming concept does this illustrate?

Two objects with the same name have different data. What Object-Oriented Programming concept does this illustrate?

PrepAway - Latest Free Exam Questions & Answers

A.
Delegation

B.
Inheritance

C.
Polyinstantiation

D.
Polymorphism

Explanation:
Answer C is correct; polyinstantiation means many instances, two objects with the same names that have different data.

Incorrect Answers and Explanations: A, B, and D: Answers A, B, and D are incorrect. Delegation allows objects to delegate messages to other objects. Inheritance means an object inherits capabilities from its parent class. Polymorphism allows the ability to overload operators, performing different methods depending on the context of the input message.

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


Leave a Reply