A-level Computing/AQA/Problem Solving, Programming, Data Representation and Practical Exercise/Problem Solving/Top-down design and Step-wise refinement





A top-down approach (also known as stepwise design) is essentially the breaking down of a system to gain insight into the sub-systems that make it up. In a top-down approach an overview of the system is formulated, specifying but not detailing any first-level subsystems. Each subsystem is then refined in yet greater detail, sometimes in many additional subsystem levels, until the entire specification is reduced to base elements. Once these base elements are recognised then we can build these as computer modules. Once they are built we can put them together, making the entire system from these individual components.

To show you an example of Top-Down design we'll take the act of making pancakes. Starting from the top we have the task to:
 * Make some pancakes

But saying that by itself isn't enough to actually make any pancakes, we need to break the task down:
 * Make some pancakes
 * 1) Organise Kitchen
 * 2) Make Pancakes
 * 3) Serve

Each of these tasks can then be broken down further:
 * 1) Organise Kitchen
 * 2) Clean surfaces
 * 3) Get out mixing bowl, whisk, spoon, sieve
 * 4) Get out plain flour, salt, eggs, full fat milk, butter
 * 5) Put on apron
 * 6) Make Pancakes
 * 7) Sift salt and flour into bowl
 * 8) Break eggs into bowl
 * 9) Whisk
 * 10) Add water and milk
 * 11) Add butter
 * 12) Whisk
 * 13) Cook
 * 14) Serve

And each of these tasks can be broken down further, let us take a look at the Cook:


 * Cook
 * 1) Get pan to temperature
 * 2) Pour batter in
 * 3) Spread batter to edges
 * 4) Use plastic spatula to check bottom of pancake
 * 5) When brown, flip
 * 6) Use plastic spatula to check bottom of pancake
 * 7) When brown finish

We can break down some of these tasks even further. So starting at a single point, the creation of a pancake, we have broken down the task into it individual parts

Draw a top-down design tree to three level depth for making a modern First Person Shooter Your answer probably won't be the same as this as the question is open to interpretation, but hopefully it'll be similar:


 * Make First Person Shooter
 * 1) Create graphics
 * 2) Characters
 * 3) Guns
 * 4) Maps
 * 5) Interface
 * 6) Create sounds
 * 7) Music
 * 8) SFX
 * 9) Create AI
 * 10) Non-playable characters
 * 11) Monsters