Computational Thinking and Data Structures: Question 1
Syllabus 9.1
A newly hired programmer at a small gym is asked to design a membership management system. Before writing any code, she splits the overall problem into four separate pieces: a module to register new members, a module to record a member's check-in at the front desk, a module to process a member's monthly payment, and a module to generate a usage report for the gym's owner.
Which computational thinking technique is illustrated by this splitting of the problem into four pieces?
Show worked solution Hide worked solution
Worked solution
Recognising decomposition
Decomposition means breaking a large, complex problem down into a set of smaller, more manageable sub-problems, each of which can be designed, written and tested separately, and each sub-problem is a natural candidate to become its own program module (a procedure or function).
In the scenario, the overall problem. “build a membership management system for the gym”, has been split into four distinct pieces: registering members, recording check-ins, processing payments, and generating a report. Each of these four pieces is a self-contained sub-problem that could become its own module. This splitting of one large problem into several smaller ones is exactly what decomposition means.
Why the other options are wrong
- A (Abstraction): abstraction is a different technique. Instead of splitting a problem into pieces, abstraction means producing a simplified model of a system that keeps only the essential details needed to solve the current problem, while hiding or ignoring anything irrelevant. For example, abstraction would be used within the “process a member’s monthly payment” module if the programmer decided to represent a member using only their MemberID, name and amount due, leaving out irrelevant details such as the member’s eye colour or favourite exercise class. The gym scenario describes splitting the whole problem into separate modules, not simplifying what detail one module keeps, so it is decomposition, not abstraction.
- C (Stepwise refinement): stepwise refinement is the process of adding more and more detail to an algorithm that has already been identified, gradually working from a general outline down to a level of detail from which the task may actually be programmed. It is not the initial act of splitting a whole problem into its major modules.
- D (Iteration): iteration is one of the three basic pseudocode constructs (alongside sequence and selection) used to repeat a set of steps. It has nothing to do with how a problem is broken down at the design stage.
Final answer
B. Decomposition: the problem has been broken down into four smaller, manageable sub-problems (modules), which is the defining feature of decomposition.