← IGCSE Computer Science Paper 2

Deciding which details to keep and which to ignore

Keep only the details the solution needs to work and ignore the rest. A library system needs the book title and borrower, not the book's colour. Too few details fails; too many makes it harder.

Understanding Deciding which details to keep and which to ignore in IGCSE Computer Science Paper 2

What it does: The loan record stores only the relevant details: which book was borrowed and who borrowed it. Nothing else is needed. The system needs the borrower to track the loan. Cover colour does not help it work, so abstraction ignores it. Abstraction filters out unnecessary detail. Keeping everything makes the problem harder to solve. Missing a needed detail means the solution fails. The borrower is required to track loans. Lesson times are needed to build a timetable. A favourite colour has no effect on how the solution works, so it is ignored. Road names and distances are needed for finding routes. Building colours are not, so ignoring them is good abstraction.

Common mistakes: The library system needs the borrower, so Borrower must be input. The book's colour is an irrelevant detail, and Borrower is never given a value. It should be INPUT Borrower. Colour is an irrelevant detail that was never input. The loan record needs the title and the borrower, so it should be OUTPUT Title, Borrower.

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
A library system records who borrowed a book. Which detail should it keep?
The colour of the book's coverThe borrower's name
Matches
loan <- [bookTitle]
↓
Too little detail: the borrower is missing, so the system cannot tell who has the book and the solution fails
Applying
Meanings
Term
abstraction
Meaning
Keep only the details the solution needs to work and ignore the rest. A library system needs the book title and borrower, not the book's colour. Too few details fails; too many makes it harder.
Practice
// Keep only what the loan needs
Testing
Gaps
BookTitle
Check Answer
Spots
3INPUT Title
4INPUT BookColour

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

The 'Hermit Crab' badge — Definition Collector, 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. A library system records who borrowed a book. Which detail should it keep?
A. The borrower's name ✓
B. The colour of the book's cover
The system needs the borrower to track the loan. Cover colour does not help it work, so abstraction ignores it.
2. Which statement about abstraction is correct?
A. Keep every detail so nothing is missed
B. Keep the details the solution needs and ignore the rest ✓
Abstraction filters out unnecessary detail. Keeping everything makes the problem harder to solve.
3. A library system stores the book title but not the borrower. What is the problem?
A. Too little detail, so it cannot show who has the book ✓
B. Too much detail, so the system is slow to understand
Missing a needed detail means the solution fails. The borrower is required to track loans.
4. A library system also stores each book's weight, cover colour and the author's favourite food. What is the effect?
A. Too much detail makes the problem harder to solve ✓
B. More detail always makes the solution better
Irrelevant details add complexity and make the problem harder to understand and solve, without helping the system work.
5. A school timetable program is being designed. Which detail is irrelevant to it?
A. The time of each lesson
B. A teacher's favourite colour ✓
Lesson times are needed to build a timetable. A favourite colour has no effect on how the solution works, so it is ignored.

Match the Pairs

abstraction → Keeping only the details the solution needs to work and ignoring the rest
IF detail NOT needed THEN IGNORE it → Remove a detail that does not help the solution work, such as the colour of a library book
A library system needs the book title and the borrower to record a loan, so these details are kept → loan <- [bookTitle, borrowerName]
The book's colour is irrelevant to lending, so it is left out of the record → book <- [title, author] // no colour
loan <- [bookTitle] → Too little detail: the borrower is missing, so the system cannot tell who has the book and the solution fails
loan <- [title, borrower, colour, weight, coverArt] → Too much detail: colour, weight and cover art are not needed, so the problem is harder than it should be

Key Term

abstraction
Keep only the details the solution needs to work and ignore the rest. A library system needs the book title and borrower, not the book's colour. Too few details fails; too many makes it harder.

Fill in the Blanks

1. INPUT BookTitle
Hint: Type the pseudocode keyword that reads a needed detail from the user.
2. Borrower ← "Mia"
Hint: Type the assignment symbol that stores a value in the variable.
3. INPUT BookTitle OUTPUT BookTitle
Hint: Type the variable that holds the detail the system just read in and needs to show.
4. IF DaysLate > 0 THEN OUTPUT "Fine due" ENDIF
Hint: Type the comparison operator that checks the borrower has days late above zero.
5. PROCEDURE CheckOut(Borrower, BookTitle) OUTPUT Borrower, BookTitle ENDPROCEDURE
Hint: Type the keyword that closes a procedure that only uses the details it needs.

Spot the Error

Question 1
A DECLARE Title : STRING
B DECLARE Borrower : STRING
C INPUT Title
D INPUT BookColour
Line D — The library system needs the borrower, so Borrower must be input. The book's colour is an irrelevant detail, and Borrower is never given a value. It should be INPUT Borrower.
Question 2
A INPUT Title
B INPUT Borrower
C OUTPUT Title, Colour
Line C — Colour is an irrelevant detail that was never input. The loan record needs the title and the borrower, so it should be OUTPUT Title, Borrower.
Question 3
A INPUT Available
B IF Available = TRUE
C OUTPUT "Can borrow"
D ENDIF
Line B — Whether the book is available is a relevant detail, and the program uses it in a decision. Every IF needs the keyword THEN, so it should be IF Available = TRUE THEN.
Question 4
A Fine = 0
B INPUT DaysLate
C Fine ← DaysLate * 0.5
D OUTPUT Fine
Line A — The fine only needs the number of days late, and the book's colour is ignored. Cambridge pseudocode uses the assignment arrow ←, so the line should be Fine ← 0.
Question 5
A INPUT Distance
B INPUT Age
C Price ← Distance * 0.2
D IF Age < 16 DO
E Price ← Price / 2
F ENDIF
Line D — The ticket price only needs the distance and the age, not the bus colour. An IF statement must use THEN, not DO. It should be IF Age < 16 THEN.

Student with a class code? Join your class →