Many different types of programming are there which are available over all these years. All the
programming languages falls into 1 of the 3 programming paradigms: Procedural, Object-Oriented,
event-driven. The 3 of these categories and helping the development of efficient, new and error-free
programming languages.
Programming Paradigms
Procedural programming is basically a programming language and it is properly structured and has
proper procedures. In procedure programming the programs are broken down into functions and
procedures. It has multiple procedures and all are linked to the main program, each of the procedure
have a purpose and it is assigned by the main program. For new programmers/beginners the language
is very straightforward and easy to understand it is used for simple systems.
An example of procedural language is python because of it using routines, sub routines, methods or
function. C++ is also an example of procedural language as it comes from C which is also a
procedural language.
The advantages and disadvantages of procedural programming are as follows:
Advantages
Useful for general purpose programing
Portable source code
Easy to follow and understand due to structed well
Disadvantages
Too many procedural language and a programmer has to specialize in a specific language
Would take a very long time for debugging
Object Orientated Programming
It breaks a program down into objects. OOP is different when compared to procedural programming
as OOP has a different structural format. OOP is used for dealing with complex and more advanced
systems while procedural programming was not able to fix system difficulties. Object are designed to
do a set of activities by a programmer. The objects are designed a set of activities according to how
the programmer has set it. The functions and data are linked together in the building blocks of life. In
this programming the objects are related a lot to the real-world objects and the objects are often
considered as classes. In this programming paradigm the functions of the program can easily be
changed as the code is stored in classes.
Advantages
OOP has made it easy to maintain and the modifying of the existing code as any new object
can be created by making small differences to the ones which are already made.
OOP helps in providing a clearer modular structure for the programs and this is why it is good
for defining the abstract data types where the implementation details are hidden.
, Disadvantages
Object oriented programs are very large in size, this used to be a problem during the times
when memory was limited.
More planning is needed which is very time consuming as planning is needed before writing
the code.
Object oriented programs tend to be slower due to it has the need of more system resources.
Event Driven Programming
It is where a program responds to an event which has happened due to the users input (ex: clicking a
button). It is a type of programming which is different from the other programming paradigms which
the system does not respond to the structure of the program. Although it’s program structure is very
similar to OOP. It requires a programmer to write event procedures to respond to the inputs of the
user. The program is interactive and is used for GUI or graphical user interface and other programs
like photoshop. As the program is good it requires more processing power and more memory.
Advantages
The programmer can easily make changes if the changes are required in the program.
Language is easy to understand so programs are easy to make.
Disadvantages
Memory intensive
These programs are known to be slow as too much processing power is needed to make the
calculations which make these programs run. 9
P3 Explaining Sequence, Selection and Iteration
Sequencing:
A code will be processed by the computer based on how a programmer wants it. Starting from line
one of the program and then ending at the bottom. Instructions which comes one after the other after
the earlier instruction is completed it may take the computer some amount of time to process and
continue to the next instruction. An example of a sequence is a flow chart as it is easy to understand
since it has different shapes and colours to understand. It is also step by step like a sequence. It also
has different steps leading towards the end. None of the action can be skipped as then the sequence
will not remain.