A large program is divided into small modules. The basic idea
is – “to develop a small set of statements is comparatively simpler”. The C
provides the facilities of functions to support modular programming.
Modularization is a design time activity. To take full
advantage of modularization, modules should be independent of one another. One
module should perform one atomic task. One module should not be given to many
responsibilities.
Advantages of Modular Programming- Following are the advantage of modular programming.
(i) Simplicity
in development – It is easier to
develop a small set of statements as compared to a large one. It is also easier
to concentrate on a small code.
(ii) Faster
development – A big task is divided
into logically separate many small task. The development of these small modular
task can be done simultaneously. In this way, development can be done in less
time.
(iii) Reusability – If a module is developed in such a way that it is
logically independent from other modules, then it can be used again and again.
it saves time and efforts, so software code reduced.
(iv) Abstraction – Abstraction means hiding of details. Hiding of
details. Hiding of detail provides simplicity. Functions once developed can be
called at many places. Each time when it is called, there is no need to
concentrate on its implementation details. It reduces complexity and enhances
clarity. Abstraction provides more opportunity to concentrate on the higher
level logic of a program/task.
(v) Reduced code
size – When a set of statements used
at many places, it is better to design a function for this code and call it at
multiple place. It drastically reduces the code size.
Simplicity in testing and modification – Modular programming gives the opportunity to concentrate on a confined area. It provides easiness in testing. Moreover, modification in a module is simpler as compared to modification in the complete program.
No comments:
Post a Comment