411 REFERENCE · Wikibooks
A-level Computing/AQA/Problem Solving, Programming, Data Representation and Practical Exercise/Problem Solving/Top-down design and Step-wise refinement
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
Stages of problem solving
Structure charts
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.
Top-down design in which design begins by specifying complex pieces and then dividing them into successively smaller pieces
Example: Making Pancakes
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
Organise Kitchen
Make Pancakes
Serve
Each of these tasks can then be broken down further:
Organise Kitchen
Clean surfaces
Get out mixing bowl, whisk, spoon, sieve
Get out plain flour, salt, eggs, full fat milk, butter
Put on apron
Make Pancakes
Sift salt and flour into bowl
Break eggs into bowl
Whisk
Add water and milk
Add butter
Whisk
Cook
Serve
And each of these tasks can be broken down further, let us take a look at the Cook:
Cook
Get pan to temperature
Pour batter in
Spread batter to edges
Use plastic spatula to check bottom of pancake
When brown, flip
Use plastic spatula to check bottom of pancake
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
Exercise: Top-down design
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
Create graphics
Characters
Guns
Maps
Interface
Create sounds
Music
SFX
Create AI
Non-playable characters
Monsters