In: Computer Science
Explain the importance of program modularization using at least one example.
300 words
The term modularization have an important impact on the designing of any program or software. Because In this approach a program will split to different modules and each module have distinct task.
This will increase the efficiency of a program. While writing a program in traditional approach we are writing the code in sequential manner. In this approach if a program will have a large number of statements then its too difficult to identify the errors and also having problem to understand the codes. If the program code will have any logical error then its quiet impossible to debug it, because of identification of particular statement from thousands of statements. So The modular program approach emphasizes on modules which can be designed by considering a set of statements according to their functionality. So whenever we will face problem then directly we will go to that specific module and make changes over there(if any). And another most important feature of modular approach is that code reusability. That means once write a code that will be used as many times as requirement. Since the codes are provided in set of modules so on requirement one will have to call that module instead of providing the code again and again, which will increase the efficiency of the program.
Some of key features of modular approach are
Easy to maintain and debugging.
Easy to use
Provides reusability
Example:
Let us consider student management system. In this task we will have to maintain all the transaction related to student with an organization. So some of basic operations related to this are
· To maintain the student records.
· To maintain records of every student in library.
· To maintain records of every student in department.
· To maintain records of every student for examination section.
· To maintain records of every student for account section.
If a student will want to issue a book from library then simply call to the module related to library section, so that it will be easy to issue by checking the details about the availability of books and whether the student have issued a book or not etc….
Similarly we can check the details about the payment of a student by calling the module related to payment. If any one want to know the performance of student then simply call to the module related with examination section.
But if we will write the program in sequential approach then for each requirement we will have to provide the code and that also quiet impossible to write. Because the number of requirement will depends on the user so that its too difficult to provide the code each time, which will lead to inefficiency of a program.
So the modular programming will minimize the complexity of a program in terms of users point of view as well as programmers point of view by increasing the efficiency.