Menu

Structure Diagrams

Benefits of Structure Diagrams

A structure diagram is a planning tool that shows how a problem has been decomposed into smaller parts. Its main benefit is that the whole problem and its subsections sit in one view, so everyone working on the solution can see what must be produced and how each section links to the rest.

Sharing and testing the work

Because each box represents a separate task, the work can be divided between programmers. One programmer might take the subsection that handles customer details, while another takes the subsection that works out totals. Each box can become a sub program, so the parts can be built separately. This also means each part can be tested separately before everything is combined, which makes faults easier to find.

Spotting repeated tasks

Repeated tasks are easy to spot when the same small task appears under more than one subsection. For example, a structure diagram for a school charity fair might show a task to record a payment under both the cake stall and the book stall. You can then write that task once as a single sub program and reuse it, saving time and keeping the code consistent.

Planning before code

Structure diagrams help you map out a program before you write any code. You can check that every subsection has been included and that nothing important has been missed. If a box is still too large, you can break it down further before you start coding, which is much cheaper than discovering the gap later.

Practise this

OCR GCSE Computer Science · Structure Diagrams