12.08 - Stepwise refinement Flashcards
What is stepwise refinement?
Stepwise refienement is the method of breaking down the steps of an outline solution into smaller steps until it is detailed enough.
What is the use of stepwise refinement?
It is used to solve bigger problems by breaking them down into smalled steps using stepwise refinement.
How to make the solution programmable?
Stepwise refinement
the steps need to be broken down into basic constructs such as sequences, assignment, selection, repetition, input and output
What are modules?
They are another method of developing a solution by decomposing the problem into sub tasks. Each sub task can be considered a module that is refined seperately.They are procedured and functions that group together a number of steps and give them an identifier
What are procedures?
Procedures group together a number of steps and give them a name that can be used to refer the group of steps.
What are functions?
Functions group together a number of steps and give them a name that produces and returns a value that is used in an expression
How should modules be designed?
They should be designed to be self-contained and not rely on external variables
How should all variables required by a module be passed to it?
Using parameters
What are local variables?
Variables used only within a module
What are global variables?
All variables