Tuesday, 11 November 2014

Modular Elements Are Important (M1)

Modular Elements Are Important !

Modularity is a general concept which applies to the development of software. It allows individual modules to be developed, in many cases this is done with a standardized interface to allow modules to work and communicate properly. Each module works independent to each other. Large software systems are really hard and complex to build this is where modularity comes in to break down a large system into separate physical entities that in a nutshell make it easier and more straightforward to understand.
In procedural programming modular elements are a programming style in which the program is split up into small parts or chunks, each one of these chunks contribute to the program and perform a task. Procedural programming gives a computer  specific steps however modular makes it easier for the computer to understand the instructions.
As you can see this is my example of modular code. The code has been separated into modular elements. Skin colour, Name, Son, Weight and sex are all now modular elements. The whole code has been put in modular elements because it makes it easy to understand and it makes it easier for the computer to understand. 




To activate the modular codes you have to add Set before the element. For e.g. (setWeight) then  you can set the weight to what you want. As you can see the whole code has been set into sub codes which makes it easier to solve and if any problems occur then its easier to solve. Also the code has been set into order such as name, sex and weight which is really good and easy top understand.

Advantages of using modular elements:
  • Modules can be re-used over and over again.
  • This technique is used when working as a part of a team as each member will have a different module to work on. 
  • It is easier to test a small modular program than a whole program and easier to find mistakes.
  • Programs which are not written in modules are harder to understand.
  • You can work on each module independently, Working on small parts at a time makes making a program a much faster and efficient process. 









































































No comments:

Post a Comment