QuestionQ25

VerifiedAdvanced Object-Oriented Programming

Which object-oriented programming pillar does the following code snippet represent?

Question Image

Explanation

Polymorphism allows the same operation, such as calling run(), to produce different behavior depending on the object’s type. Here, classes A and C provide distinct implementations of run().

Community Discussion

No comments yet. Be the first to start the discussion!