A student guide to the AQA 7517 non-exam assessment (NEA). Part 3 of 5: Documented design (12 marks).
The design is worth 12 marks. It should show how your solution is structured, clearly enough that someone could understand its parts without having to read your code. For the general ideas behind design, see 4.13.1.2.
What the design must achieve
A good design describes how all of the key aspects of your solution (or investigation) will be structured. A reader should be able to see:
- the overall structure of the system and how its parts fit together;
- what data is stored and how;
- the algorithms for the important or difficult parts;
- the interfaces between modules;
- how the user will interact with it.
If the reader has to look at the program to find out how it is structured, the design is not good enough.
The design is allowed to change as you go. The work is iterative, and a design is often revised after you start coding. Keep the document up to date, and note the important changes.
Suggested structure
- System overview: a diagram of the main parts.
- Modular structure: a hierarchy chart, and the interface of each key module.
- Data design: the data model, tables or data structures, and validation.
- Algorithms: the key ones, in pseudo-code or flowcharts.
- User interface design: sketches of the screens.
- Test plan outline (optional but useful).
Aim for concise and clear. Quality matters more than length.
1. System overview
Draw a simple diagram showing the main parts of the system and how data moves between them. For a program with a database and a screen:
Add a sentence or two explaining what each part is responsible for.
2. Modular structure and interfaces
Break the solution into modules (subroutines, classes or groups of them), each with one clear job (cohesion), that interact through clear interfaces (loose coupling). A hierarchy chart is the standard way to show this (see 4.1.2.2).
Then document the interface of the key modules.
| Module | Parameters | Returns | Purpose |
|---|---|---|---|
load_network() |
none | graph (dictionary of lists) | Reads stops and links from the database |
shortest_route(graph, start, end) |
graph, two stop IDs | list of stop IDs and total minutes | Finds the quickest route |
check_login(username, password) |
two strings | True or False |
Checks an administrator's login |
add_link(from_id, to_id, minutes) |
two IDs, integer | True or False |
Adds a link, after validating it |
This tells a reader what each module does and how to use it, without any code.
3. Data design
Show how the data is organised. Use whatever is right for your project.
For a database:
- an ER diagram and the tables with their fields, data types, primary keys and foreign keys;
- evidence that the tables are normalised, to third normal form where it makes sense (see 4.10.3);
- the main SQL queries you expect to need, and what they do.
STOP (StopID, Name)
LINK (LinkID, FromStopID, ToStopID, Minutes, RouteName)
ADMIN (AdminID, Username, PasswordHash)
FromStopID and ToStopID in LINK are foreign keys, each referring to StopID in STOP.
For other data structures: describe the arrays, lists, dictionaries, records, classes, files or graphs that you'll use, and why they suit the job. For example, "a dictionary mapping each stop ID to a list of (neighbour, minutes) pairs, because the route search needs to find all the neighbours of a stop quickly".
Validation: for each important input, say what you will check.
| Input | Validation |
|---|---|
| Stop name | Not empty, at most 40 characters |
| Minutes | Whole number from 1 to 120 |
| Start and destination | Both chosen, and not the same stop |
4. Algorithms
Design the key algorithms, especially those that are complicated or central to the project (your technical skill). Use pseudo-code or a flowchart. You don't need to show every trivial routine.
FUNCTION shortest_route(graph, start, end)
set distance of every stop to infinity
distance[start] <- 0
WHILE there are unvisited stops
choose unvisited stop v with smallest distance
mark v as visited
FOR each neighbour n of v with link time w
IF distance[v] + w < distance[n] THEN
distance[n] <- distance[v] + w
previous[n] <- v
ENDIF
NEXT n
ENDWHILE
RETURN route built backwards from end using previous
ENDFUNCTION
Explain your choice briefly: "Dijkstra's algorithm is used because the links have different journey times, so a breadth-first search wouldn't find the quickest route."
For a simulation or investigation, design the model, the rules or equations, the experiment (what you will vary, what you will measure) and how you will record and analyse the results.
5. User interface design
Sketch each main screen (hand-drawn, or made with a drawing tool), and annotate it. Show the layout, the inputs and outputs, the buttons, and what happens next.
Explain why it suits the users: large text for older passengers, drop-down lists to prevent typing errors, and an obvious button. Link the design to what the users said in your analysis.
6. Plan how you will test
It helps to draft a test plan now: for each objective, which tests (normal, boundary and erroneous data) will show it has been met. You can complete it later, with results (Guide 4).
Worked example: a design page for one module
Module:
shortest_routePurpose: find the quickest route between two stops (objective O2). Input: the graph, a start stop, a destination stop. Output: an ordered list of stops and the total time. Data structure: graph as a dictionary of adjacency lists, built from theLINKtable. Algorithm: Dijkstra's, as in the pseudo-code above. Validation: start and destination must exist and be different (checked before calling). Tests: a known pair of stops with a known best route (normal), a start equal to the destination (erroneous), stops with no connecting path (boundary).
Checklist before you move on
- A reader could understand the structure without seeing the code.
- There's a hierarchy chart or equivalent, with key interfaces documented.
- The data model (tables or structures) is shown, with types and keys.
- The key algorithms are designed in pseudo-code or flowcharts.
- Screen designs are shown and explained.
- Validation is planned.
- The design matches the objectives.
Common mistakes
- A design that is just screenshots of the finished program.
- Too vague: "there will be a database" with no tables.
- Designing everything in pseudo-code that is the same as the code.
- No algorithms for the difficult parts.
- Design that doesn't match what you built, and no explanation of why it changed.
- Too long with trivial detail.
Tip: if you change the design while coding (this is normal), update the document and add a short note about why. That shows an iterative, thoughtful approach.
Check yourself
What should a reader be able to tell from your design?
How all or almost all of the key aspects of the solution are structured, without having to look at the program itself.
What is a hierarchy chart used for?
To show how the solution is split into modules and how they relate, so the structure of the program is clear.
Which algorithms should you design in detail?
The key ones, especially those that are complicated or central to the project, such as the main algorithm that shows your technical skill. Trivial routines don't need it.
Is it acceptable for the design to change during the project?
Yes. Development is iterative, but you should update the design document and explain why it changed.