2.1.3 Abstraction, Decomposition and Structure Diagrams
Cambridge 9618 · International A Level Computer Science · ~12 min read
Notes
Video
Slides
Quiz
Worksheet
Abstraction
Abstraction means reducing a complex problem to its essential features by removing irrelevant details. In computing, abstraction occurs at many levels:
Problem abstraction — representing a real-world problem as a simplified model (e.g., a road network as a graph)
Data abstraction — hiding implementation details behind an interface (e.g., using a stack without knowing how it's stored internally)
Procedural abstraction — calling a function without knowing how it works internally
Abstraction layers — the layered model of computing (hardware → OS → application → user)
• Connections between entities (which nodes are linked) • Relevant properties (edge weights/distances) • The structure needed to solve the problem
Real-World Examples of Abstraction
London Underground map — abstraction of the real rail network; shows connections, not true geography
Chess as a 2D array — abstracts away the physical board; only piece positions matter
A high-level programming language — abstracts away CPU instructions, registers, and memory addresses
A file system — abstracts away physical disk sectors; shows folders and filenames
Decomposition
Decomposition is breaking a large, complex problem into smaller, more manageable sub-problems. Each sub-problem is:
• easier to understand individually
• can be solved, coded and tested independently
• can be combined to solve the whole problem
Benefits of Decomposition
Easier to manage — large problems become a set of smaller, tractable tasks
Team development — different developers can work on different modules simultaneously
Reusability — modules can be reused in other programs
Easier testing — each module can be tested in isolation (unit testing)
Easier maintenance — a bug is isolated to a specific module
Structure Diagrams
A structure diagram (also called a hierarchy chart) is a visual representation of decomposition. It shows:
The top-level problem (root node)
How it is broken down into sub-problems (child nodes)
The hierarchy of modules
Structure diagrams do NOT show the order of execution or data flow — they only show the hierarchy/structure.
Flowcharts visually represent the logic/flow of an algorithm using standardised shapes. Cambridge 9618 requires knowledge of these symbols:
Shape
Symbol
Purpose
Rounded rectangle (oval)
START / END
Marks the beginning or end of an algorithm
Rectangle
PROCESS
A computation or assignment step (e.g., total ← total + 1)
Diamond
DECISION
A yes/no question — branches the flow
Parallelogram
INPUT / OUTPUT
Data input or output operations
Arrows
FLOW
Show the direction of execution
Flowchart Example — Is a number positive?
START
↓
INPUT num
↓
num > 0?
YES
↓
OUTPUT "Positive"
NO
↓
OUTPUT "Not positive"
↓
END
Comparison: Structure Diagrams vs Flowcharts
Feature
Structure Diagram
Flowchart
Shows order of execution
No
Yes
Shows hierarchy of modules
Yes
No
Shows decision logic
No
Yes (diamond)
Shows data flow
No
No (use DFD for this)
Best for
Planning module structure
Documenting algorithm logic
Exam tip: Cambridge 9618 Paper 2 examiners award marks for structure diagram accuracy. Common pitfalls: (1) confusing structure diagrams with flowcharts — structure diagrams show hierarchy, not flow; (2) failing to show enough levels of decomposition — go down to the level of individual procedures/functions.
⚠️ Common Mistakes
Saying abstraction and decomposition mean the same thing — they don't. Abstraction removes detail; decomposition breaks into sub-problems.
Drawing arrows between structure diagram nodes to show order — structure diagrams don't show sequence, only hierarchy
Using the wrong flowchart shape — processes (rectangle) and I/O (parallelogram) are commonly confused
Not drawing enough levels of decomposition in a structure diagram — go down until you reach individual procedures
✅ Notes completed!
▶
Video coming soon
Click slide or press arrow keys to navigate
Worksheet — 2.1.3 Abstraction, Decomposition and Structure Diagrams
8 questions · Cambridge 9618 standard
Q1Explain what is meant by abstraction in the context of problem-solving, giving one real-world example.[3]
✅ Mark scheme
Abstraction is the process of removing or hiding unnecessary detail from a problem to focus on what is relevant [1]; this allows a complex real-world problem to be represented as a simplified model [1]; example: representing a road network as a graph (nodes = junctions, edges = roads) ignoring traffic signals, road surface type, and scenery [1]. Other valid examples accepted (e.g., London Underground map, chess as a 2D array).
Q2State three benefits of decomposition when developing a large software system.[3]
✅ Mark scheme
Any three: different developers can work on different modules simultaneously [1]; each module can be tested independently (unit testing) [1]; bugs are isolated to specific modules, making debugging easier [1]; modules can be reused in other programs [1]; each sub-problem is smaller and easier to understand [1].
Q3Describe what a structure diagram shows. State one thing it does NOT show.[3]
✅ Mark scheme
A structure diagram shows how a problem is broken down into a hierarchy of sub-problems/modules [1]; the top-level problem is the root node, with child nodes representing sub-problems at each level [1]; it does NOT show the order of execution (sequence) of the modules / does not show data flow / does not show decision logic [1].
Q4Name the four standard flowchart shapes used in Cambridge 9618 and state the purpose of each.[4]
✅ Mark scheme
Oval/rounded rectangle: start or end of algorithm [1]; Rectangle: process/computation step [1]; Diamond: decision point (yes/no branch) [1]; Parallelogram: input or output operation [1]. (Arrows/flow lines: show direction of execution — accept as optional fifth.)
Q5Explain the difference between a structure diagram and a flowchart.[3]
✅ Mark scheme
A structure diagram shows the hierarchical breakdown of a problem into modules — it shows structure, not sequence [1]; a flowchart shows the logic and flow of execution of an algorithm, including decisions and loops [1]; a structure diagram does not show order of execution or decision logic, while a flowchart does [1].
Q6A school wants to develop a library management system. List four top-level sub-systems you would identify in a structure diagram for this system.[2]
✅ Mark scheme
Any four of: book catalogue management [1]; member/student account management [1]; borrowing and returns processing [1]; overdue fines/notifications [1]; book search/reservations [1]; reports generation [1]. Award 1 mark per reasonable sub-system, max 2 marks.
Q7Write pseudocode for a procedure that takes an array of 10 integers (1-indexed) and outputs the sum and average. Declare all necessary variables with correct data types. Use a FOR loop and ensure the average is output as a REAL value even if the sum is INTEGER.[6]
✅ Mark scheme
PROCEDURE header with array parameter e.g. PROCEDURE CalcStats(Nums : ARRAY[1:10] OF INTEGER) [1]; DECLARE Sum : INTEGER ← 0 [1]; DECLARE Avg : REAL [1]; FOR loop from 1 to 10 accumulating Sum [1]; Avg ← Sum / 10 [1]; OUTPUT Sum and Avg [1]. Accept equivalent correct pseudocode. Award max 6.
Q8A program stores student data with fields: Name (STRING), Score (INTEGER), Grade (CHAR). The program must: input 5 students, assign a grade (A if Score ≥ 70, B if ≥ 50, else C), then output all names and grades. Write the pseudocode, using a record type and an array of records.[7]
✅ Mark scheme
TYPE Student RECORD / Name : STRING / Score : INTEGER / Grade : CHAR / ENDRECORD [1]; DECLARE Students : ARRAY[1:5] OF Student [1]; FOR loop 1 to 5: INPUT Name and Score into Students[i].Name and Students[i].Score [1]; IF/ELSEIF correctly assigning Grade: ≥70→'A', ≥50→'B', else 'C' [1]; Storing grade: Students[i].Grade ← grade [1]; Second FOR loop outputting Students[i].Name and Students[i].Grade for all 5 [1]; Correct pseudocode syntax throughout (ENDFOR, ENDIF, arrow assignment ←) [1]. Award max 7.
Topic Quiz
Question 1 of 10
You scored
out of 10
Card 1 of 6
Click to reveal definition
🎉
All cards reviewed!
Term
Definition
🎯
Mini Test — 2.1.3
10 questions · 10 marks · 10 minutes
⏱ 10:00
Section A — Multiple Choice [5 marks]
Q1Which shape is used in a flowchart to represent a decision?
Q2A structure diagram is used to show:
Q3The London Underground map is an example of abstraction because:
Q4Which flowchart shape is used for INPUT and OUTPUT operations?
Q5Which of the following is NOT shown by a structure diagram?
Section B — Short Answer [5 marks]
Q6State the difference between abstraction and decomposition.
Mark schemeAbstraction removes unnecessary detail to simplify a problem representation [1]; decomposition breaks a complex problem into smaller, more manageable sub-problems [1].
Q7Give two reasons why modular decomposition makes large programs easier to test.
Mark schemeEach module can be tested independently (unit testing) [1]; if a bug is found, it is isolated to a specific module rather than searching the whole program [1].
Q8Draw a simple structure diagram for a "Banking App" with at least three top-level sub-systems.
Mark schemeRoot: Banking App [1]; Three valid sub-systems e.g.: Account Management, Transactions, Notifications [1 per sub-system up to 3]; at least one sub-system further decomposed (e.g., Transactions → Deposit / Withdraw / Transfer) [1].
Q9Explain the difference between a process box and a decision box in a flowchart.
Mark schemeA process box (rectangle) represents a computation or assignment step — a single operation performed on data [1]; a decision box (diamond) represents a condition that evaluates to yes or no, causing the flow to branch in two different directions [1].
Q10Give one example of procedural abstraction and explain why it is useful.
Mark schemeExample: calling a SORT procedure without knowing how it works internally / calling a SQRT function without knowing the algorithm used [1]; useful because the programmer can use the function without understanding its implementation — reduces complexity and saves time [1].