0% found this document useful (0 votes)
35 views

Procedural Programming Paradigm

The document is about programming paradigms and procedural programming. It defines procedural programming as breaking programs into smaller manageable parts called procedures or functions. The main components are the main program and functions. Functions can access global data but local data is only visible within each function. Procedural programming is easy for beginners but not suitable for large complex projects as it focuses on functions rather than data.

Uploaded by

EL- Musa
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

Procedural Programming Paradigm

The document is about programming paradigms and procedural programming. It defines procedural programming as breaking programs into smaller manageable parts called procedures or functions. The main components are the main program and functions. Functions can access global data but local data is only visible within each function. Procedural programming is easy for beginners but not suitable for large complex projects as it focuses on functions rather than data.

Uploaded by

EL- Musa
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Unit 1: Programming

Unit code: D/615/1618


Unit level: 4

Content Prepared by:

School of Computing and Informatics 1


2

Prepared by: Ms. Dania Alsaid, Ms. Hana Alrasheed


programming paradigm is a style, or “way,” of programming.

Some languages make it easy to write in some paradigms but not others.

Never use the phrase “programming language paradigm”.

A paradigm is a way of doing something (like programming), not a concrete


thing (like a programming language).

Prepared by: Ms. Dania Alsaid, Ms. Hana Alrasheed 3


Prepared by: Ms. Dania Alsaid, Ms. Hana Alrasheed 4
Prepared by: Ms. Dania Alsaid, Ms. Hana Alrasheed 5
Prepared by: Ms. Dania Alsaid, Ms. Hana Alrasheed 6
7

Prepared by: Ms. Dania Alsaid, Ms. Hana Alrasheed


▪ Procedural programming means a large program is broken down into smaller
manageable parts called procedures or functions.

Main
Program
The basic component of
the procedural paradigm
Function 1 Function 2 Function 3 is a Function/ Procedure

Prepared by: Ms. Dania Alsaid, Ms. Hana Alrasheed 8


▪ The procedural Paradigm uses a linear top-down approach
the program execution starts at the top and the program statements are
executed one after another.

The program is executed


line by line from top to
bottom

Prepared by: Ms. Dania Alsaid, Ms. Hana Alrasheed 9


▪ Instead of letting the main program do the whole job, the job is divided into tasks and
each task is assigned to a procedure (Function)

Each Function/
Procedure is responsible
for doing one task

Prepared by: Ms. Dania Alsaid, Ms. Hana Alrasheed 10


▪ Each function has its own data (variables) , that are only accessible inside the same function
where it was declared and initialized.

Function 1 Function 2
The local data of function
1 are not visible to
function 2 and vise
versa.
Local Local
Data Data

Prepared by: Ms. Dania Alsaid, Ms. Hana Alrasheed


11
▪ All functions can access the global data (variables) , declared and initialized outside functions

The local data of


functions are visible only
to the function itself but
the global data are
visible for all the
functions

12
Prepared by: Ms. Dania Alsaid, Ms. Hana Alrasheed
▪ Easy to learn by beginners.

▪ Straight forward program organization.


▪ The code can be reused in different parts of
the program, without the need to copy it- you
just call the procedure/ function.
▪ The program flow can be tracked easily.

Prepared by: Ms. Dania Alsaid, Ms. Hana Alrasheed 13


▪ It is not suitable for large and complex
projects.
▪ It focuses on functions and data is not getting
enough attention.
▪ Difficult to relate with real-world objects

Prepared by: Ms. Dania Alsaid, Ms. Hana Alrasheed 14


15

Prepared by: Ms. Dania Alsaid, Ms. Hana Alrasheed

You might also like