The top-down design approach to develop a program
The top design approach works by decomposing a system from a high level of abstraction into a more detailed level (lower level) of abstraction.It allows us to build solutions to a problem in a stepwise manner.It consists of 3 steps which are as follows:-
1. Breaking a problem into sub problems:- Each general statement or set of statements about the solution are taken one at a time, and broken down into a more precisely defined subtasks.These subtasks should more accurately describe how the final goal is to be reached.
2. Choosing data structures:- It is an important decision while devising a computer solution to a problem.Various data structures are available.The choice depends on it’s simplicity and effectiveness in processing data.
3. Construction of loops:- The implementation of subtasks in top-down design may involve the loops or iterative constructs.Loops with i/o statements, expressions and assignments are the core of program implementation.