Modular programming is the practice of breaking down a program's functionality into independent interchangeable modules. Each of these modules have everything necessary to execute only that aspect of the desired functionality, in the case they are needed.
Modular programming is important because it creates a structure that keeps the code organized and easier to maintain. For example, if you had to change an object used throughout a program, with modular programming you would only have to find the module where the character was coded. Compared to not having modularization, if you wanted to accomplish this you would be required to read the code line by line having to find and edit that character everywhere it was used.
Programming languages like C#, java, and C have this implemented by having different methods or identifiers. Once that is created then you are able to use those methods elsewhere in your code, which also saves time by not having to re-write the method all over again.
Sources:
https://www.techopedia.com/definition/25972/modular-programming
Comments
Post a Comment