Modular programming also called as stepwise refinement or top-down design is a programming approach that breaks down program functions into modules.
Programming Languages that support the concept of modular programming are Ada, Algol, COBOL, Component Pascal, D, Erlang, F, Fortran, Haskell, HyperTalk, IBM/360 Assembler, IBM RPG, Java (packages are considered as modules), MATLAB, ML, Pascal, Perl, PL/I, Python, Ruby, SmallTalk etc.
Modular programming is a solution to the problem of very large programs that are difficult to debug and maintain. Libraries of components built from separately compiled modules can be combined into a whole by using a programming tool called linker.
Some advantages of modular programming are as follows:
Modular programming concept is compatible with object-oriented programming (OOP) to a large extent.