0984

Problem Solving and Design

Algorithm Design and Problem Solving · 4 question types

Exam Frequency Analysis

Past paper frequency (2018 to 2024)

This topic accounts for approximately 6% of your exam marks.

stable
Low
Stable6%

Decomposition, abstraction and structure charts appear as design-focused questions.

Most programming projects follow a standard sequence of stages, sometimes called the program development life cycle.

Analysis

The analysis stage is about understanding the problem clearly before any code is written.

The deliverable is a requirements document that lists:

  • What the program must do (functional requirements: "the program shall calculate average attendance").
  • Any constraints (non-functional requirements: "must run on a school computer", "must complete in under 5 seconds").
  • The success criteria that say when the requirement has been met.

This is where and abstraction are most useful: the programmer breaks the big problem into sub-problems and identifies only the data and behaviour that matter.

Design

The design stage produces a blueprint for the solution before any code is written.

Common ways of describing a design:

  • Structure diagrams show how the program is decomposed into modules.
  • Flowcharts show the step-by-step flow of control (topic 19).
  • Pseudocode is a code-like notation that is language-independent (topic 19).
Top-down structure chart: a main module broken down into get-data, process-data and show-results sub-modules
Source: Top-down structure chart by Save My Exams

Coding

The coding stage turns the design into a working program in a chosen programming language.

Each module is coded according to the design. Programmers run iterative tests as they write: as soon as a module exists, it gets tested; as soon as something fails, it gets debugged before the team moves on.

Testing

The testing stage exercises the finished program with carefully chosen to confirm it meets every requirement.

The whole program is run many times, with different inputs, to find any remaining bugs and confirm the requirements are met. Section 6 covers the test-data categories you should know.

Where the program goes next

After testing, programs are usually released (or deployed) and then enter a maintenance phase, where bugs are fixed and new features added over the program's life. The syllabus stops at testing, but in real life maintenance is often the biggest stage of all.