A-level Computer Science revision · Computational thinking

Decomposition and thinking procedurally

The idea

Decomposition breaks a complex problem into smaller sub-problems that are easier to solve, test and assign to different programmers. Thinking procedurally means identifying the steps and their order. Thinking logically means identifying decision points and conditions.

  1. Break the problem into sub-problems, often as a top-down design.
  2. Order the steps.
  3. Identify where decisions and conditions occur.

Watch out Each sub-problem should be small enough to be solved by one subroutine.

See it worked

Worked example

Decompose a program to run a quiz.

  1. Load questions; display a question; get and check the answer.
  2. Update the score; repeat; show the final result.
  3. Each part becomes a subroutine.

Answer Load, ask, check, score, report

Your turn

Question 11 mark

What is a benefit of decomposition?

Choose one
Question 21 mark

What is thinking logically?

Choose one
Question 32 marks

Explain how a top-down design helps a programming team.

Write your answer, then see a model answer
  1. Describe the split.
  2. Explain the team benefit.

Answer The problem is split into modules with clear interfaces, so different programmers can build and test them separately, then combine them.

A-level Computer Science Pro, OCR H446

A-level Computer Science Pro

£119 once

Price rises to £199 on 1 January. Save £80 by joining before then.

At least 12 months of access

By paying you agree to our Terms and get access straight away, which ends your 14-day cancellation right.

No VAT is charged.

Independent practice for OCR A-level Computer Science (H446), not endorsed by OCR.

Privacy · Terms