← IGCSE Computer Science Paper 2

Abstraction (7b)

Keeping only the detail that matters for the problem and hiding the rest, like a tube map showing stations and lines but not exact distances.

Understanding Abstraction (7b) in IGCSE Computer Science Paper 2

What it does: The model keeps only the data the program needs and leaves out the rest, which shows abstraction in action. The essential facts for the problem stay in the solution; only irrelevant detail such as the bus colour is dropped. Abstraction means filtering out unnecessary detail so you can focus on what the problem really needs. The marks are essential to calculate an average. A favourite colour has no effect on the result, so it is ignored. A model leaves out unneeded detail, so it is simpler than the real thing. This makes the problem easier to understand and solve. The fare depends on distance, so it is essential. The taxi colour does not affect the cost, so abstraction removes it.

Common mistakes: Cambridge pseudocode keywords must be written in capitals. In this tube map model the station name is the detail kept, and the line should be INPUT startStation. A tube map uses abstraction. It keeps stations and lines but hides exact distances. Storing exact metres keeps unnecessary detail, so the line should be tubeLines ← 3.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 107–118) and word search (Modules 94–118).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Which statement best describes abstraction?
Keeping only the detail that matters for the problem and leaving out the restIncluding every possible detail about the problem so nothing is missed
Matches
Abstraction means keeping every detail about the problem
↓
Abstraction is the opposite: it removes unnecessary detail and keeps only what matters for the problem.
Applying
Meanings
Term
abstraction
Meaning
Keeping only the detail that matters for the problem and hiding the rest, like a tube map showing stations and lines but not exact distances.
Practice
// Abstraction: keep only what matters
Testing
Gaps
// hides unneeded detail
Check Answer
Spots
1OUTPUT "Start station?"
2input startStation

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Oryx' badge — Desert Navigator, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Which statement best describes abstraction?
A. Keeping only the detail that matters for the problem and leaving out the rest ✓
B. Including every possible detail about the problem so nothing is missed
Abstraction means filtering out unnecessary detail so you can focus on what the problem really needs.
2. A tube map shows stations and lines but not the exact distances between stations. Why is this an example of abstraction?
A. It is wrong because it leaves out some real-world information
B. It keeps the detail travellers need and hides detail they do not need ✓
Leaving out exact distances is deliberate. A traveller only needs to know which stations connect and where to change lines.
3. A programmer is making a program to work out a student's average mark. Which detail can be left out by abstraction?
A. The student's favourite colour ✓
B. The student's marks
The marks are essential to calculate an average. A favourite colour has no effect on the result, so it is ignored.
4. True or false: A model built using abstraction is simpler than the real thing.
A. False
B. True ✓
A model leaves out unneeded detail, so it is simpler than the real thing. This makes the problem easier to understand and solve.
5. Which is a purpose of abstraction?
A. Hiding unnecessary detail so the problem is easier to solve ✓
B. Removing the essential facts so the program runs faster
Abstraction hides the unnecessary detail only. The essential facts must always stay.

Match the Pairs

abstraction → Keeping only the details that matter for the problem and leaving out the rest
A tube map shows stations and lines only → Abstraction: exact distances and real street layouts are hidden because travellers do not need them
A model is simpler than the real thing because unnecessary detail has been removed → Model of a school canteen: menu, price, quantity (no wall colour or room size)
Abstraction does not mean losing the essential facts: the details needed to solve the problem are kept → Bus timetable app keeps: route number, stop name, departure time
Abstraction means keeping every detail about the problem → Abstraction is the opposite: it removes unnecessary detail and keeps only what matters for the problem.
Quiz app abstraction: remove the questions and keep the logo colour → The essential facts (questions, answers, score) were removed and an irrelevant detail was kept. Abstraction should keep what is needed.

Key Term

abstraction
Keeping only the detail that matters for the problem and hiding the rest, like a tube map showing stations and lines but not exact distances.

Fill in the Blanks

1. // abstraction hides unneeded detail
Hint: Type the name of the technique that keeps only the detail that matters.
2. // Tube map keeps stations and lines DECLARE Station : STRING
Hint: Type the data type used to store a station name.
3. // A model is simpler than the real thing
Hint: Type the word that describes how a model compares with reality.
4. // Room area: colour is not needed FUNCTION Area(Length, Width) RETURNS REAL RETURN Length * Width
Hint: Type the keyword that states the type of value a function gives back.
5. // Keep essential facts, hide the rest Station ← "Bank" OUTPUT Station
Hint: Type the pseudocode assignment symbol that stores a value in the variable.

Spot the Error

Question 1
A OUTPUT "Start station?"
B input startStation
C OUTPUT startStation
Line B — Cambridge pseudocode keywords must be written in capitals. In this tube map model the station name is the detail kept, and the line should be INPUT startStation.
Question 2
A // Tube map model
B stations ← 12
C exactMetres ← 8731
D OUTPUT stations
Line C — A tube map uses abstraction. It keeps stations and lines but hides exact distances. Storing exact metres keeps unnecessary detail, so the line should be tubeLines ← 3.
Question 3
A INPUT busNumber
B IF busNumber = 42
C OUTPUT "Town Centre"
D ENDIF
Line B — An IF statement needs the keyword THEN after the condition. The bus display model only needs the number and destination, and the line should be IF busNumber = 42 THEN.
Question 4
A FUNCTION Label(n : STRING) RETURNS STRING
B RETURN n
C ENDPROCEDURE
D OUTPUT Label("Bank")
Line C — A FUNCTION must be closed with ENDFUNCTION, not ENDPROCEDURE. This function returns only the station name and hides the rest of the detail.
Question 5
A count ← 0
B FOR i ← 1 UNTIL 5
C count ← count + 1
D NEXT i
E OUTPUT count
Line B — A FOR loop uses TO to give the end value, not UNTIL. UNTIL belongs to REPEAT loops. The line should be FOR i ← 1 TO 5.

Student with a class code? Join your class →