Modular Programming (2.1.e)
Modular programming (sometimes known as "top-down design") is where a problem is split into sub-tasks until each task can be completed relatively easily.
Below is an example of a modular structure diagram. The main tasks are at the top of the diagrams, and the sub-tasks are below.
- Modular programming allows several programmers to work on an individual program at the same time, thus, making development of program faster, as well as allowing modules to be produced by experts in their area.
- The code base is easier to debug, update, modify and understand, as individual modules can be tweaked if necessary. It leads to a structured approach as a complex problem can be broken into simpler tasks.
- Modules can be re-used to solve similar problems similar to those that have already been solved, reducing the amount of code which needs to be produced.
- Modules can be programmed in different languages, which are more appropriate for the specific module.