ITPEC FE Subject A April 2024 Question 36

Which of the following is the most appropriate description of polymorphism in object-oriented design?

Explanation

A single interface to entities of different types — polymorphism lets one operation name work on objects of different classes, each with its own implementation.

The caller sends the same message, such as draw(), without knowing the object's exact class; a Circle and a Square each respond with their own version, typically by overriding a method declared in a common superclass or interface. New types can then be added without changing the calling code.

Answer (d)

Why not others:

  • •(a) — defining new classes by reusing existing ones as their basis is inheritance
  • •(b) — concentrating on the essential characteristics and ignoring the rest is abstraction
  • •(c) — combining data and the processes that operate on it into one object is encapsulation

Key rule: The core object-oriented concepts each answer one question: encapsulation (what goes together), inheritance (what is reused), abstraction (what matters), polymorphism (one interface, many behaviors).

System Development Technology · AI-written, may contain errors

This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.