Friday 21 November 2014

Modular Elements are Important (M1)

Modularity is when you split your code up into separate manageable pieces. Making it easier to read, follow and understand. Doing this is important if you aren't the only person working on the program as anyone else will be able to see what does what, when it does it and where. More specifically Modularity separates code into functions and procedures. each module that it makes performs one function and contains all the source code to perform that function.

Modularity is a solution for the problem with large programs as it allows you to debug a lot easier as you can find the issue quickly. By breaking the program into modules that perform clearly defined functions you can find the source of the problem quickly and easily.


Here is an image example of modularity taken from a program that creates attributes of a human being. As you can see the methods which makes the attributes are split (Making each attribute in it's own method instead of all in one) This makes the code easier to read and it will be easy to find any problems it may have.

No comments:

Post a Comment