An Introduction to the Software
Top Down Design
Top
down design is the name of a design process, where one
could break down the project or objective or task, into smaller
modules, level
after level, until it reaches a level where it is easy, to be
implemented. It
is also know as Stepwise design.
The
modules are separate entities, with their own functionalities.
The modules are the breakdowns of the Task. In
the first level, we have the Task. In the
second level, we have the Task as broken down into modules, so as to
simplify
the task. In the third level, we have each of the modules, broken down into sub modules. And the process
continues, level after level, until we reach a level consisting of sub
modules,
that can be implemented with ease.
Advertisement.
|
|
After
all that has been done. We then we go up, level by
level. The module above implements its logic in which it includes the
logic of
the sub modules below. The module, above
that module, implements its logic, which includes the logic of all the
modules
below it. We keep going this way until we reach the top, where the Task
is
implemented by a logic, which includes the logic of all the modules
below it.
This greatly simplifies, the design and execution of the Task.
One could think of
the modules as black boxes, where you send in the query, and get back a
result.
In the software context, the modules are functions, which implement the
purpose
of the module.
This
design was widely used, in Software programming, before
the introduction of Object Oriented
Design, popularly known as OOD. The advent of the language, C++, in the
early
1990s, popularized OOD. C++ is the
Object Oriented version of C.
Advertisement.
|
|
The
programming language, which extensively used Top Down
design, was the C programming language. In the programming of this
language, we
would first do a design. A Top Down design. We would take the project,
and
divide it into functions, and each function would be broken down to
more
functions. This process would go on, until the complexity of the
function would
go down, and it could be coded with ease.
We
will first do the design by drawing a chart known as a
flow chart. In this chart, we put the project in level 1. We then break
down
the project and create many functions, in the second level. Those
functions
would be further broken down, resulting in many functions, in the third
level.
This process would continue, until we reach a level, where the
complexity of
the function is minimal. We find such a level for each of the streams
from the
project, which is at the top. This is how top down design is
accomplished.
We
then do a pseudo code for each of the functions, under the project,
with a distinct input and output. We treat each of the functions as
black boxes, and define what the inputs should be, and what the
function would output.
After
all this have been done, we start with the coding of the functions, and
the whole project.
After
the functions have been coded, we call the main functions, in the
'main()' program.
The
main functions then call the functions under them, and those functions
call the ones under them as per the Top Down design that we did. Thus
coding is very simplified, as we reduced the complexity of the project
by breaking it down, with Top Down design.
The
main program and functions are then compiled using the appropriate C
compiler.
The
compiler gives out the executable of the program, which is the end
result for the software project.
Advertisement.
|
|