Stepwise Refinement
Stepwise Refinement is an example of a top-down
methodology for developing a computer program.
It begins with expressing the program as a small number of
large tasks, then sub-dividing each task into more and more
smaller and smaller tasks until each small task is easily
achievable in the chosen programming language. The tasks
should be written in language which avoids explicit
references to any particular programming language.
Stepwise Refinement -
Example 1. The program should:
• Determine the class average for a set of test marks, input by the user.
• The number of test marks is not known in advance, so the user will have to
enter a trigger value to indicate that all the results are in.
Stepwise Refinement -
Example
1 Declare and initialize variables
2 Input marks till all are in
3 Calculate class average and output result
Steps 1 and 3 seem simple at the moment (might need to revisit
them later), but 2 definitely needs more explanation
Get Free Quote!
317 Experts Online