Back to Topic 7.2 — OOP: multiple classes
7.2.2Computer Science HL5 flashcards

Polymorphism

Practice Flashcards

Flip to reveal answers
Card 1 of 57.2.2
7.2.2
Question

What is polymorphism?

Click to reveal answer

Track your progress — Sign up free to save your progress and get smart review reminders based on spaced repetition.

All 5 Flashcards — Polymorphism

Sign up free to track progress and get spaced-repetition review schedules.

Card 1definition

Question

What is polymorphism?

Answer

The **same call** behaving differently depending on the object it is made on — the caller never asks what type it holds.

Card 2comparison

Question

Overriding or overloading: same name, different parameters, one class?

Answer

**Overloading** — resolved at compile time. Overriding is a child replacing a parent's method, resolved at run time.

Card 3concept

Question

What does polymorphism replace?

Answer

A type-checking **if-chain**, repeated everywhere the objects are handled — and every copy is a place to forget a type.

Card 4example

Question

What does adding a new subclass cost in polymorphic code?

Answer

**Nothing** — it works with existing loops immediately, so no working code is edited and nothing can break.

Card 5concept

Question

Is inheritance the same as polymorphism?

Answer

No. Inheritance **shares** a method; polymorphism is the same call **resolving differently** per object. Inheritance is usually how it is achieved.

Track your progress with spaced repetition

Sign up free — Aimnova tells you exactly which cards to review and when, so you remember everything before your IB exam.

Start Free
IB Computer Science Polymorphism Flashcards | 7.2.2 | Aimnova