Writing exam answers about decomposition and abstraction

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Writing exam answers about decomposition and abstraction

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Which answer defines decomposition correctly?
A Removing unnecessary details so only the important features remain
B Breaking a complex problem down into smaller, more manageable sub-problems
2. Which answer defines abstraction correctly?
A Splitting a problem into smaller sub-systems that can be solved separately
B Keeping only the details needed to solve the problem and ignoring the rest
3. Which exam answer would earn the reason mark for 'Explain why decomposition is useful'?
A It makes the problem easier to solve because each smaller sub-problem can be tackled separately
B Decomposition is very useful and helps a lot when writing programs
4. A student writes: 'Decomposition makes testing easier because each sub-system can be tested on its own.' What is good about this answer?
A It uses a key term and links the point to a reason
B It repeats the question without adding any reason
5. A question asks you to list the inputs for a program that calculates the area of a rectangle. Which answer is correct?
A The length and the width entered by the user
B Length multiplied by width to get the area

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1Decomposition is breaking a problem into smaller sub-problems. AThis gives a point but no reason. It needs a 'because' to explain why, such as because smaller parts are easier to understand and test.
2Abstraction is removing unnecessary detail and keeping the important parts. BThis confuses abstraction with decomposition. Breaking a problem into parts is decomposition, while abstraction is removing unnecessary detail.
3A full-mark answer links each point to a reason, for example by using the word 'because'. CA correct one-sentence definition of decomposition that uses the key term accurately.
4A full-mark answer for a scenario lists the input, process, output and storage using the correct terms. DInput: score. Process: add to total. Output: display total. Storage: save to file.
5Abstraction is breaking a problem into smaller sub-problems. EA correct one-sentence definition of abstraction that uses the key term accurately.
6Decomposition makes a problem easier to solve. FDecomposition makes the problem easier because each sub-system can be solved and tested separately.

Definitions

full-mark answer

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
_____________ means breaking a problem down into smaller sub-problems.
2.
___________ removes unneeded detail to focus on the important features.
3.
Decomposition makes it easier _______ each sub-system can be tested separately.
4.
The four parts are input, process, output and _______.
5.
Removing detail is abstraction, not _____________.

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A Decomposition splits a problem
B into smaller sub-problems.
C This helps and each part
D is easier to solve.
Question 2
A Abstraction removes unneeded
B detail and keeps all features.
C It makes a problem simpler.
Question 3
A Two key terms are different.
B Decomposition = hiding detail
C Abstraction = hiding detail
Question 4
A Scenario: a quiz app
B Input: player's answer
C Output: compare with correct
D Output: right or wrong message
E Storage: high score file
Question 5
A Scenario: library loans
B Input: book ID and member ID
C Process: check the book is in
D Process: loan receipt printed
E Storage: loan records file

Answer Key

Writing exam answers about decomposition and abstraction
Section A: Quick Questions
Q1
B — Breaking a complex problem down into smaller, more manageable sub-problems
Q2
B — Keeping only the details needed to solve the problem and ignoring the rest
Q3
A — It makes the problem easier to solve because each smaller sub-problem can be tackled separately
Q4
A — It uses a key term and links the point to a reason
Q5
A — The length and the width entered by the user
Section B: Match the Pairs
Q1
Decomposition is breaking a problem into smaller sub-problems. → A correct one-sentence definition of decomposition that uses the key term accurately.
Q2
Abstraction is removing unnecessary detail and keeping the important parts. → A correct one-sentence definition of abstraction that uses the key term accurately.
Q3
A full-mark answer links each point to a reason, for example by using the word 'because'. → Decomposition makes the problem easier because each sub-system can be solved and tested separately.
Q4
A full-mark answer for a scenario lists the input, process, output and storage using the correct terms. → Input: score. Process: add to total. Output: display total. Storage: save to file.
Q5
Abstraction is breaking a problem into smaller sub-problems. → This confuses abstraction with decomposition. Breaking a problem into parts is decomposition, while abstraction is removing unnecessary detail.
Q6
Decomposition makes a problem easier to solve. → This gives a point but no reason. It needs a 'because' to explain why, such as because smaller parts are easier to understand and test.
Section C: Definitions
Q1
full-mark answer — Uses key terms (sub-system, decomposition, abstraction, input, process, output, storage) correctly and gives a reason for each point, for example by using the word 'because'.
Section D: Fill in the Blanks
Q1
Decomposition means breaking a problem down into smaller sub-problems.
Q2
Abstraction removes unneeded detail to focus on the important features.
Q3
Decomposition makes it easier because each sub-system can be tested separately.
Q4
The four parts are input, process, output and storage.
Q5
Removing detail is abstraction, not decomposition.
Section E: Spot the Error
Q1
C — The sentence gives no reason. A full-mark answer links the point with 'because', for example 'This helps because each part is easier to solve.'
Q2
B — Abstraction keeps only the key features, not all of them. The line should say 'detail and keeps key features.'
Q3
B — This confuses decomposition with abstraction. Decomposition means splitting a problem into smaller parts, so the line should be 'Decomposition = splitting up'.
Q4
C — Comparing the answer with the correct one is a process, not an output. The line should start 'Process:'.
Q5
D — A printed receipt is shown to the user, so it is an output, not a process. The line should start 'Output:'.