Wednesday, 19 November 2014

Application And Limits. (P1)

Application And Limits.

Procedural programming – this is a high level programming paradigm. This has a basic rhythm/sequence of statements. This is straightforward and simple way of programming as it does not get complicated. Procedural programming is based on the whole idea of using procedures. Procedures are a set of commands to be executed. Procedures are just small programs. They are sometimes known as sub-programs. The purpose of a procedure is to help a programmer avoid repetition. A procedure start off with a begin and end up with end. The procedure can also have its own variables which cannot be used the main program. In a nutshell a procedure is a section of a program that performs a specific task or in other words an ordered set of tasks for performing some sort of action.Many people use procedural programming for the following reasons....
  • It is simple and easy to follow and read the code
  • You can re-use a lot of the code which are designed as procedures.
  • It is very easy to maintain the code involved.
There are also many advantages and disadvantages 
  • Clear structure making the code easy to read.
  • The code is written in steps so it is easier to identify mistakes. This means it is very easy to debug.
  • The program is easier to maintain compared to other language types
However there are also disadvantages.. 
  • Procedural code is very hard to find a way to relate it with real world objects
  • When the code gets to big for instance in the thousands the code can get out of hand and hard to maintain meaning procedural programming is better for short and efficient programs. 
As you can see procedural programming is very efficient and good method to use however it should not be used when programming very large codes as it can be harder to maintain and keep efficient. 

Event driven programming:
Event driven programming is a paradigm which is used to structure a program around multiple events. There are many events such as input in graphical user interfaces to networking requests. Nowadays most things use Event programming even non-graphical applications such as fire alarm. There are many advantages of Event driven programs...

  • It allows us to create and use more interactive programs, The majority of today's GUI are written with event driven programming.
  • It allows hardware to interact with software more easily 
  • Ease of development
  • Simplicity for GUI (Graphical user interfaces)





This is an example of event driven programming as you can see i made a code and as i ran the code and event was triggered and in response an input box popped up, In a nutshell this is how event driven programming works, An event is triggered and in response something happens. 



Object orientated programming paradigm: This is a paradigm which is based the concept of objects. Unlike event driven which is based around "Events" object orientated is based around "Objects". Objects can be literally anything Humans,(Name, Date of birth, Address etc), Cars (Make, Date made, Colour) In this method programmers must decide which objects they want to manipulate. There are many advantages and disadvantageous of OOP or in other words object orientated programming.
  • It has a clear modular structure
  • easy to modify and maintain the code
  • Provided good framework
There also disadvantages...
  • The size of these programs are really big and they take up a lot of the computers resources
  • In this program it takes more time to find and compile things because of the size of these programs are normally very big.
  • It takes a lot of effort to make this type of program as you need to make classes and objects very carefully.







































As you can see this is a example of object orientated programming, The object in this example is a human so i have to declare things such as height, Weight etc, As you can see it is easier to structure a program and much more efficient fro when you are working in groups. 


















No comments:

Post a Comment