Up: Unit 03
A program can be very long and complex. To manage such a complexity, it is
necessary to realize programs in a modular way.
- The program must be structured in autonomous parts, called
- The various modules are related to each other through precise
A module is characterized by:
- services exported to clients (these are other modules
that make use of such services)
- an interface, i.e., the way in which such services are exported
- imported services, i.e., services for which the module is a
- an internal structure, i.e., how the module is realized; the
internal structure is not of interest for clients.
The use of modularization allows us to realize programs as follows:
- we define which modules are necessary to solve the requested problem;
- we define how these modules are related to each other;
- we develop each module independently from the other modules.
By proceeding in this way we enhance various qualities of a program, which
simplify dealing with the program. Specifically:
- readability (or understandability) of the program
- extensibility (i.e., the possibility of extending the functionalities of
the program, if necessary)
- reusability of parts of the program for different purposes
Up: Unit 03