One method of solving a problem is by stating the problem and then subdividing the problem into subproblems. Each subproblem, in turn, can be treated as another problem, so it can be further divided into smaller subproblems. The process is repeated until each subproblem is one that is easy to be solved. This strategy is referred to as divide-and-conquer.
This
process is also known as stepwise
refinement. After
each refinement, greater detail is addd to the solution algorithm.
The diagram above illustrate different
levels of decomposition of a problem using a block
diagram. We begin by identifying the major
tasks to be done to solve the problem and arranging them in the order that
they are to be carried out. If these tasks are still complex, we subdivide
them into smaller subtasks, resulting in additional levels.
Since the decomposition starts st
the top level and then works down, we call this method top-down
design. The task indentified at each level
of subdivision is called a module.