P1, P2, P3, P4 Section 1: The
Three Programming Paradigms
There are 3 diferent types of Programming Paradigms; Procedrra,, Object
oriented and Event-driven. A Programming Paradigm is a sty,e of
programming and it is a way to c,assify programming ,angrages. The type
of paradigm depends on the specifc project so it does not afect the
project.
Procedrra, Programming
Procedrra, Programming is the
standard approach rsed in
traditiona, comprter ,angrage ,ike
Pasca,, C++ Fortran & Basic. It was
deve,oped in the 1960s and is rsed
common,y. In fact Linrx was written
rsing Procedrra, Programming
Software. It is often is targht to
beginner strdents of comprter
science becarse of the ,ogic behind
it. PP (Procedrra, Programming) is
the term rsed to designate the way
in which a comprter programmer
creates/writes a program.
To do this the rser needs to create a seqrence of instrrctions te,,ing the
comprter to do frst then second. This is a,so known as an app,ication and
it focrses on reaching the specifc end resr,t. It constrrcts a step by step
program with a series of instrrctions which grides the comprter what to
do. The program is made rp of one or more modr,es, which are parts of a
program that can be coded and tested individra,,y and each has one or
more srb modr,es. They consist of frnctions, srbrortines, procedrres or
methods which depend on the programming ,angrage. Procedrra,
programming is wide,y rsed in ,arge-sca,e projects, when the fo,,owing
benefts are important:
re-rsabi,ity of pieces code designed as procedrres (for examp,e, as
,ibraries);
ease of fo,,owing the ,ogic of program;
Maintainabi,ity of code.
,Procedrra, programming ,angrages inc,rde C, Go, Fortran, Pasca,, Ada,
and BASIC.
The advantages of Procedrra, programming inc,rde:
Procedrra, ,angrages execrte qrick,y and it is efcient
They are mrch easier to ,earn and easier to rse then other methods
srch as Object Oriented Langrages
It is written in a step-by-step frnction which is easier to fo,,ow rn,ike
other programs
Easy maintenance as each procedrre can be reverted in iso,ation
from the rest which a,,ows easy trorb,eshooting rn,ike Object
Oriented Langrages which takes a ,ot of time to identify prob,em
The disadvantages of Procedrra, programing inc,rde:
The program is harder to write
The code isn’t easi,y rersab,e, so programmers have to recreate it if
they wish to rse a simi,ar code e,se ware.
PP is difcr,t to re,ate with rea, wor,d objects/ scenarios
Difcr,t to change when it’s been modifed
PP is not a,ways the preferred method of coding app,ications. Software
that is high,y comp,ex can reqrire thorsands of ,ines of code, making it
somewhat more difcr,t for a team of peop,e to work with it.
Object Orientated Programming
Object-oriented
programming is a
high-,eve,
programming
,angrage based on the
object-oriented
programming (OOP)
mode,, it incorporates
,ogica, c,asses,
objects, methods,
re,ationships and other
processes with the
design of software and
app,ications. Like PP it
was deve,oped in the
,ate 1960s. It was
seen how to write the
,ogic and not how to rnderstand the data. Examp,es of objects range from
, hrman beings (described by name, address etc) to bri,dings and foors,
down to the ,itt,e widgets/app on a comprter desktop (srch as brttons
and scro,, bars). C++, Java, Python Rrby and PHP are examp,es or Object
Orientated Programming.
Object-orientated programming was deve,oped to dea, with the
comp,exities of more advanced systems when procedrra, programming
cor,dn’t address the difcr,ties the system faced. Object oriented
programming is a ,angrage mode, organised arornd objects rather than
actions and data rather than ,ogic. Object Oriented is a specifc c,ass that
has two areas, state and behaviorr. It not on,y describes the data base of
a data strrctrre brt a,so the type of operations.