โ† Back to subjects
โญ 0
AQA A-level Computer Science (7517) ยท Systematic approach to problem solving
Mini-Lesson

Systematic approach to problem solving

This mini-lesson covers AQA 4.13 โ€” Systematic approach to problem solving: the five stages every serious piece of software goes through, and the testing discipline that stops it shipping broken.

  • Analysis โ€” requirements and feasibility
  • Design โ€” algorithms, data structures and the interface
  • Implementation
  • Testing โ€” black-box, white-box, boundary, alpha and beta
  • Evaluation against the original requirements

Work through each screen, answer the questions as you go (some are recall, some are calculations you must actually work out) and collect โญ stars. Press Start when you're ready.

4.13 ยท Analysis

Analysis

The stage where you find out what the problem actually is โ€” before a single line of code is written.

  • Problem definition โ€” state precisely what must be achieved.
  • Fact finding โ€” interviews, questionnaires, observation, and study of the existing system's documents.
  • Requirements specification โ€” a testable list of what the system must do (functional) and how well (non-functional: speed, capacity, usability, security).
  • Feasibility study โ€” is it possible technically, economically, legally, and within the time available?
  • Data flow diagrams โ€” model how data moves through the current and the proposed system.

The most expensive mistake in software is made here. A requirement misunderstood in analysis and discovered after release costs orders of magnitude more to fix than one caught on day one. Every requirement must be written so that it can be tested โ€” "the system should be fast" is not a requirement; "search must return within 2 seconds for 10 000 records" is.

4.13 ยท Design

Design

Design decides how the solution will work โ€” still without writing production code.

  • Decomposition โ€” break the problem into sub-problems, and those into subroutines.
  • Algorithm design โ€” pseudo-code or flowcharts for each module.
  • Data structure design โ€” which structures, chosen on complexity grounds (a hash table for O(1) lookup; a BST to keep data sorted).
  • Data / file design โ€” record structures, field types, sizes, validation rules.
  • User interface design โ€” screen layouts, navigation, accessibility, error messages.
  • Test plan โ€” written now, from the requirements, not after the code exists.

Why write the test plan before the code: if you design the tests afterwards, you unconsciously write tests your code already passes. Deriving them from the requirements instead means they test what the system was supposed to do.

4.13 ยท Testing

Testing

TypeWhat it means
Black-boxTest from the outside: given this input, is the output correct? The tester ignores (or cannot see) the code.
White-boxTest from the inside: examine the code and design tests that exercise every path and every branch.
UnitTest each subroutine in isolation.
IntegrationTest that the modules work together.
AlphaTesting in-house, by the developers and their own testers.
BetaTesting by real users outside the company, on real hardware, in real conditions.

Test data must cover three categories:

  • Normal / typical โ€” data the system should accept (age = 25);
  • Boundary / extreme โ€” values right on the edge of validity (for a range 1โ€“100: 0, 1, 100, 101);
  • Erroneous / invalid โ€” data the system must reject gracefully (age = "banana").

Boundaries are where bugs live. Almost every off-by-one error hides at the edge of a range โ€” a < written where a <= was meant. Testing 50 in a 1โ€“100 range proves nothing. Testing 0, 1, 100 and 101 finds the bug.

Calculate

Your turn โ€” boundary testing

1A field must accept whole numbers from 1 to 100 inclusive. Testing the last invalid value and the first valid value at each end of the range, how many boundary test values should be used?
values
Hint: At the lower end you test the last invalid value and the first valid one. Do the same at the upper end.
Calculate

Your turn โ€” white-box paths

2A subroutine contains two independent IF statements, one after the other, each with a THEN and an ELSE branch. How many distinct paths through the code must white-box testing cover?
paths
Hint: The first IF can go two ways; for each of those, the second IF can also go two ways.
4.13 ยท Evaluation

Implementation and evaluation

Implementation is writing, translating and installing the code โ€” with meaningful identifiers, comments, and a modular structure that mirrors the design. Then comes installation: direct changeover, parallel running, phased, or pilot.

Evaluation judges the finished system against the original requirements specification โ€” not against how proud you feel of it. It asks:

  • Does it meet each requirement? Cite the evidence.
  • Is it robust, usable, maintainable and efficient enough?
  • What does the end user say?
  • What are its limitations, and what would you do differently?

The mark-scheme trap: "it works and I am pleased with it" scores nothing. Evaluation is evidence-based comparison against a specification, requirement by requirement, including the ones you failed to meet. Naming a shortcoming honestly, and explaining how you would fix it, earns marks. Pretending there are none does not.

Quick check

Black-box vs white-box

?A tester is given the program and the requirements document, but not the source code, and checks that each input produces the specified output. What kind of testing is this?
Quick check

Test data

?A field accepts marks from 0 to 60. Which set of values is the best choice of boundary test data?
Quick check

Evaluation

?What must an evaluation be measured against?
4.13 ยท Analysis tools

Data flow diagrams and structure charts

Two diagrams do most of the work in this topic.

A data flow diagram (DFD) models how data moves through a system. It uses just four symbols: external entities (sources and sinks of data), processes (which transform it), data stores (where it rests), and data flows (arrows). A DFD deliberately says nothing about timing, hardware or control flow โ€” it is a pure abstraction of the movement of information.

A structure chart models the hierarchy of the solution: which module calls which, and what parameters pass between them. It is the visual form of top-down decomposition.

Why draw the current system first? Because you cannot improve what you do not understand. Modelling the existing process almost always exposes duplicated data entry, a step nobody can justify, or a data store two departments each believe they own.

Quick check

Requirements

?Which of these is a non-functional requirement?
4.13 ยท Approaches

Iterative development and prototyping

The five stages are not always walked through once, in order. Two alternatives matter:

  • Iterative development โ€” cycle through analysis, design, implementation and testing repeatedly, each time adding a slice of functionality. Problems surface early, while they are still cheap to fix.
  • Prototyping โ€” build a rough, throwaway version so the user can react to something real. Users are far better at criticising a thing in front of them than at imagining one from a document.

The classic failure mode: a strictly linear process discovers a misunderstood requirement during testing โ€” the most expensive possible moment. Iteration exists to bring that discovery forward. The cost is a moving target for scope, which is why the requirements must still be written down.

Calculate

Your turn โ€” sizing the test plan

3A form has 3 input fields. Each is to be tested with normal, boundary and erroneous data โ€” one test case of each type per field. How many test cases does the plan contain?
test cases
Hint: Three categories of test data, applied to each of the three fields.
4.13 ยท Maintenance

After release โ€” maintenance

Software is not finished when it ships. Maintenance is usually the largest part of a system's total cost, and it comes in four kinds:

  • Corrective โ€” fixing the bugs that testing missed;
  • Adaptive โ€” changing the system because the world changed (a new OS, a new tax rate, a new law);
  • Perfective โ€” improving performance or adding features users have asked for;
  • Preventive โ€” refactoring to reduce the chance of future faults.

Why maintainability is designed in, not added on: meaningful identifiers, modular subroutines, comments and clear documentation cost a little now and save enormously later โ€” because the person maintaining this code in three years will almost certainly not be you, and will have no idea what you were thinking.

Sort it

Which stage is it?

Tap the activity, then tap the stage it belongs to.

๐Ÿ”Ž Analysis

๐Ÿ“ Design

๐Ÿงช Testing

Match it

Match the term to its meaning

Tap an item on the left, then its partner on the right.

Meaning
Term
Recap

The big ideas to know

Analysis: problem definition ยท fact finding ยท requirements (functional and non-functional) ยท feasibility ยท data flow diagrams

Design: decomposition ยท algorithms ยท data structures ยท file and interface design ยท the test plan

Implementation: modular code, meaningful identifiers, comments; then installation

Testing: black-box vs white-box ยท unit and integration ยท alpha (in-house) and beta (real users)

Test data: normal ยท boundary (0, 1, 100, 101) ยท erroneous โ€” boundaries are where the bugs live

Evaluation: evidence-based comparison against the requirements specification, limitations included

That is the whole of AQA 4.13. Press Finish to see your score.

๐Ÿ†

Mini-lesson complete!

โญโญโญ

You've worked through Systematic approach to problem solving for AQA A-level Computer Science (7517). ๐ŸŽ‰

Your stars: 0 / 0

Next: test yourself in the Evaluate stage Confidence Quiz, then lock it in with Verify.

๐Ÿ“ฃ Smashed it? Share your score

Challenge a mate to beat your stars, or show a parent how you got on.

โ†’ Back to all subjects