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

Abstraction

Practice Flashcards

Flip to reveal answers
Card 1 of 57.2.3
7.2.3
Question

What is abstraction?

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 — Abstraction

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

Card 1definition

Question

What is abstraction?

Answer

Exposing only the operations a caller needs and **hiding how they are done**.

Card 2comparison

Question

Abstraction or encapsulation?

Answer

**Abstraction** decides *what* is exposed (design). **Encapsulation** enforces *how* it is protected (access control).

Card 3concept

Question

Why can an abstract class not be instantiated?

Answer

Its abstract methods have **no bodies**, so an object of it could be asked to run a method that does not exist.

Card 4comparison

Question

Abstract class or interface — when do you use each?

Answer

**Abstract class** when children share real behaviour and attributes. **Interface** when unrelated classes must offer the same operations.

Card 5example

Question

What is a leaky abstraction?

Answer

One where the caller must know **how** it works to use it correctly — saveToMySQL() rather than save().

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