Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
12 views

introduction to Modular Programming

The document discusses the concept of modular programming, which involves breaking down large programs into smaller, manageable sub-programs or modules to enhance maintainability and readability. It highlights the advantages of modular programming, including ease of use, reusability, and ease of maintenance. Additionally, it explains the importance of functions in programming, categorizing them into program control functions and specific task functions.

Uploaded by

Extra Test
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

introduction to Modular Programming

The document discusses the concept of modular programming, which involves breaking down large programs into smaller, manageable sub-programs or modules to enhance maintainability and readability. It highlights the advantages of modular programming, including ease of use, reusability, and ease of maintenance. Additionally, it explains the importance of functions in programming, categorizing them into program control functions and specific task functions.

Uploaded by

Extra Test
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

BS(Information Technology) 1st Semester.

Programming Fundamentals

Programming fundamentals

BS(IT) 1st semester

Introduction to Modular Programming

Modular programming is the process of subdividing a computer program into separate sub-
programs. A module is a separate software component.

• Some programs might have thousands or millions of lines and to manage such programs it
becomes quite difficult as there might be too many of syntax errors or logical errors
present in the program, so to manage such type of programs concept
of modular programming approached.
• Each sub-module contains something necessary to execute only one aspect of the desired
functionality.
• Modular programming emphasis on breaking of large programs into small problems to
increase the maintainability, readability of the code and to make the program handy to
make any changes in future or to correct the errors.

Points which should be taken care of prior to modular program development:

1. Limitations of each and every module should be decided.


2. In which way a program is to be partitioned into different modules.
3. Communication among different modules of the code for proper execution of the entire
program.

Advantages of Using Modular Programming Approach –

1. Ease of Use

This approach allows simplicity, as rather than focusing on the entire


thousands and millions of lines code in one go we can access it in the form of modules.
This allows ease in debugging the code and prone to less error.

2. Reusability

It allows the user to reuse the functionality with a different interface without
typing the whole program again.
BS(Information Technology) 1st Semester. Programming Fundamentals

3. Ease of Maintenance

It helps in less collision at the time of working on modules, helping a team to


work with proper collaboration while working on a large application.

Concept of Modularization

One of the most important concepts of programming is the ability to group some lines of code into
a unit that can be included in our program. The original wording for this was a sub-program. Other
names include: macro, sub-routine, procedure, module and function. We are going to use the
term function for that is what they are called in most of the predominant programming languages
of today.

Functions are important because they allow us to take large complicated programs and to divide
them into smaller manageable pieces.

Because the function is a smaller piece of the overall program, we can concentrate on what we
want it to do and test it to make sure it works properly.

Generally, functions fall into two categories:

1. Program Control – Functions used to simply sub-divide and control the program. These
functions are unique to the program being written. Other programs may use similar
functions, maybe even functions with the same name, but the content of the functions are
almost always very different.

Program Control functions normally do not communicate information to each other but use
a common area for variable storage

2. Specific Task – Functions designed to be used with several programs. These functions
perform a specific task and thus are usable in many different programs because the other
programs also need to do the specific task. Specific task functions are sometimes referred
to as building blocks. Because they are already coded and tested, we can use them with
confidence to more efficiently write a large program.

You might also like