Why modular elements are important for procedural programming Essay

I am working as a junior for an electronic games maker. My manager has asked me to write a short guide to the basics of procedural programming and to demonstrate some of the techniques. I will explain why modular elements are important for procedural programming.

Modular programming is a software design technique that highlights separating the functionality of a program into independent, interchangeable modules, that each contain everything necessary to execute only one aspect of the desired functions.

We Will Write a Custom Essay Specifically
For You For Only $13.90/page!


order now

There are different elements of procedural programming. It’s a programming design style in which a program is split up into small chunks that complete each part of the task. Example:

Procedural programs give the computer a series of instructions for example for a calculator program. Then carry out the task and calculations according to what the user specifies. Modular Design breaks down complex procedures into simple steps which can be turned into computer code much more easily. You can fit modules together very well so the interfaces are very important. For example, what data is passed into modules (parameters) and what data is passed out (return values).

There are many advantages to modular programming. Firstly, modular programming is good because you can work on each module independently which means it’s easier as you are working on a small part.

In addition, having modular elements in procedural programming is important because it enables you to call a piece of code a number of times. So when you are making a calculation and you are using addition or subtraction in the same sum you are calling on the same piece of code. So if there were not any modular elements you would have to code the same number of code multiple times in order to have the same mathematical operation in the same sum.

Furthermore, programs written without modules are likely to be large and hard to understand, modular programs are easier to understand. And it is easier to test small modules rather than a whole program.

In conclusion, modular programming is very useful and can turn complex programming projects to small easy tasks. Without, programming would be confusing and hard to understand and therefore is very important.

With a specific end goal to make the procedural application for the games page, I’ve needed to make utilisation of a couple of various tools and techniques; the principal instrument that I utilised is a procedure. Techniques are little areas of code that developers use with a specific end goal to play out a specific task. I utilised this tool since I needed the project to just complete a responsibility which was to permit individuals to tap on the ‘add to crate’ catch and afterward demonstrate to them that their thing has been added to the basket.

I then make use of a capacity which is fundamentally the same as a system as developers likewise utilise this keeping in mind the end goal to play out an unmistakable assignment. However subsequent to playing out the task, functions return with a result which is passed back to the calling function. This comes set up when the client taps to include a game to the basket more than once; this function then comes back with a value as a local variable which is the total sum of the things that the client has picked. A local variable is a value that is obscure to the fundamental system and different functions as these lone exist inside the specific function that makes them.

Likewise I made utilisation of a conditional commands which are sequences of guideline that may just be performed when certain conditions are reached and this comes set up if the client picks more than 3 games; the function will then subtract £10 from the aggregate cost that has been included and provide the client with a rebate. Another conditional command that I have utilised is the point at which the total expense of the games that have been added to the basket are more than £50, the program will then take away the delivery costs and provide the client with free shipping.