SlideShare a Scribd company logo
2
Most read
3
Most read
6
Most read
Procedure Oriented
Programming
• It means “a set of procedures” which is a
“set of subroutines” or a “set of
functions“.
• functions are called repeatedly in a program to
execute/complete tasks performed by them. For
example, a program may involve collecting data
from user (reading), performing some kind of
calculations on the collected data (calculation),
and finally displaying the result to the user when
requested (printing). All the 3 tasks of reading,
calculating and printing can be written in a
program with the help of 3 different functions
which performs these 3 different tasks.
A Real-World
Example
• Let's say that you are working for a vehicle parts
manufacturer that needs to update it's online
inventory system. Your boss tells you to program
two similar but separate forms for a website, one
form that processes information about cars and
one that does the same for trucks.
• For cars, we will need to record the following
information: Color, Engine Size, Transmission Type,
Number of doors
• For trucks, the information will be similar, but
slightly different. We need:
Color, Engine Size, Transmission Type, Cab Size,
Towing Capacity
Scenario 1
• Suppose that we suddenly need to add a
bus form, that records the following
information: Color, Engine Size,
Transmission Type
Number of passengers
• Procedural: We need to recreate the entire
form, repeating the code for Color, Engine
Size, and Transmission Type.
• OOP: We simply extend the vehicle class
with a bus class and add the method,
number Of Passengers.
Scenario 2
• Instead of storing color in a database like we
previously did, for some strange reason our
client wants the color emailed to him.
• Procedural: We change three different
forms: cars, trucks, and buses to email the
color to the client rather than storing it in
the database.
• OOP: We change the color method in the
vehicle class and because the car, truck, and
bus classes all extend (or inherit from, to put
it another way) the vehicle class, they are
automatically updated.
Scenario 3
• We want to move from a car to specific
makes, for example: Nissan and Mazda.
• Procedural: We create a new form for each
make, repeating all of the code for car
information and adding the code specific to
each make.
• OOP: We extend the car class with a Nissan
class and a Mazda class and add methods
for each set of unique information for that
car make.
Procedural vs. Object-Oriented Programming
POP OOP
In POP, program is divided into small
parts
called functions.
In OOP, program is divided into parts
called objects.
POP does not have any proper way for
hiding data so it is less secure.
OOP provides Data Hiding so
provides more security.
Example of POP are : C, VB,
FORTRAN,
Pascal.
Example of OOP are : C++, JAVA,
VB.NET,
C#.NET.
Procedur
al:
Top down
design
Global data
focused
Limited code
reuse
Complex
code
Object-Oriented:
Object focused
design
Protected
data
Code
reuse
Complex
design
VS
.
Procedural vs. Object-Oriented
Programming
Object Oriented Methodology is a
certain process through which
software can be developed. The goals
of this methodology are to achieve
Software Systems that are reliable,
reusable, extensible; hence, more
useful in the long run. The methodology
achieves its goals by the help of a
collection of objects that communicate
by exchanging messages.
Object
s
• Hence, every o
Towards a higher level of abstraction
bject has 3 important features
– 1. Characteristics (e.g. Name, Designation, Job description
etc.)
– 2. Responsibilities (e.g. drive bus, fly plane etc.) – these are
assigned on the basis of the object’s characteristics – A
manager object would have different responsibilities than a
developer, since their job descriptions (a characteristic) would
be different:
– 3. Relationships with other objects (explained in detail later) – in
order to send requests/messages to each other, objects need to
have some relationship/connection. E.g. A bus driver needs to
have access/connection to a bus in order to drive it.
Class
es
• Exercise: What class/category do these
objects belong to?
– Pencils, erasers, pens, rulers, sharpeners?
– Bananas, apples, oranges, peaches, grapes?
– Alice, Bob, Mark, Fahd, Ali, Brian?
• Guideline: A class usually represents a
noun
Classes vs.
Objects
some pictorial examples

More Related Content

PPTX
Lecture 14 run time environment
Iffat Anjum
 
PPTX
MACRO PROCESSOR
Bhavik Vashi
 
PPT
Instruction Set Architecture (ISA)
Gaditek
 
PPTX
Component based software engineering
Charotar University Of Science And Technology,Gujrat
 
PPTX
Type checking in compiler design
Sudip Singh
 
PPTX
Procedural vs. object oriented programming
Haris Bin Zahid
 
PPT
Software Engineering (Metrics for Process and Projects)
ShudipPal
 
PPT
Analysis modeling & scenario based modeling
Benazir Fathima
 
Lecture 14 run time environment
Iffat Anjum
 
MACRO PROCESSOR
Bhavik Vashi
 
Instruction Set Architecture (ISA)
Gaditek
 
Component based software engineering
Charotar University Of Science And Technology,Gujrat
 
Type checking in compiler design
Sudip Singh
 
Procedural vs. object oriented programming
Haris Bin Zahid
 
Software Engineering (Metrics for Process and Projects)
ShudipPal
 
Analysis modeling & scenario based modeling
Benazir Fathima
 

What's hot (20)

PPT
Unit 5 testing -software quality assurance
gopal10scs185
 
PPTX
Unit 3 sp assembler
Deepmala Sharma
 
PPT
program partitioning and scheduling IN Advanced Computer Architecture
Pankaj Kumar Jain
 
PPT
1.Role lexical Analyzer
Radhakrishnan Chinnusamy
 
PPTX
Phases of compiler
Akhil Kaushik
 
PPT
Unit 1 chapter 1 Design and Analysis of Algorithms
P. Subathra Kishore, KAMARAJ College of Engineering and Technology, Madurai
 
PPTX
Compilers
Bense Tony
 
PPTX
Lexical analyzer generator lex
Anusuya123
 
PPTX
Bootstrap loader
Saiteja Enimidigandla
 
PPTX
Bankers algorithm
AAQIB PARREY
 
PPT
Swap-space Management
Agnas Jasmine
 
DOCX
Compiler design important questions
akila viji
 
PDF
DAA Notes.pdf
SauravPawar14
 
PPTX
Compiler Design Unit 4
Jena Catherine Bel D
 
PPTX
[OOP - Lec 01] Introduction to OOP
Muhammad Hammad Waseem
 
PPTX
Object model
James Wong
 
PPTX
Parallel Programming
Uday Sharma
 
PPTX
System Programing Unit 1
Manoj Patil
 
PDF
Software Engineering : Requirement Analysis & Specification
Ajit Nayak
 
PPT
Program control
Rahul Narang
 
Unit 5 testing -software quality assurance
gopal10scs185
 
Unit 3 sp assembler
Deepmala Sharma
 
program partitioning and scheduling IN Advanced Computer Architecture
Pankaj Kumar Jain
 
1.Role lexical Analyzer
Radhakrishnan Chinnusamy
 
Phases of compiler
Akhil Kaushik
 
Unit 1 chapter 1 Design and Analysis of Algorithms
P. Subathra Kishore, KAMARAJ College of Engineering and Technology, Madurai
 
Compilers
Bense Tony
 
Lexical analyzer generator lex
Anusuya123
 
Bootstrap loader
Saiteja Enimidigandla
 
Bankers algorithm
AAQIB PARREY
 
Swap-space Management
Agnas Jasmine
 
Compiler design important questions
akila viji
 
DAA Notes.pdf
SauravPawar14
 
Compiler Design Unit 4
Jena Catherine Bel D
 
[OOP - Lec 01] Introduction to OOP
Muhammad Hammad Waseem
 
Object model
James Wong
 
Parallel Programming
Uday Sharma
 
System Programing Unit 1
Manoj Patil
 
Software Engineering : Requirement Analysis & Specification
Ajit Nayak
 
Program control
Rahul Narang
 
Ad

Similar to Procedure oriented programming (20)

PPTX
ProgrammingPrimerAndOOPS
sunmitraeducation
 
PPTX
PROCEDURAL ORIENTED PROGRAMMING VS OBJECT ORIENTED PROGRAMING
Uttam Singh
 
PPT
73d32 session1 c++
Mukund Trivedi
 
PPTX
Intro To C++ - Class 14 - Midterm Review
Blue Elephant Consulting
 
PPTX
Basic concepts of parallelization
snegacmr
 
PDF
Continuous delivery for machine learning
Rajesh Muppalla
 
PPTX
Intro to C++ - Class 2 - Objects & Classes
Blue Elephant Consulting
 
PPTX
Intro To C++ - Class 2 - An Introduction To C++
Blue Elephant Consulting
 
DOCX
Resume
Tarun1990
 
PDF
Aa03101540158
ijceronline
 
PPTX
Programming using C++ - slides.pptx
HeadoftheDepartment
 
PPT
Architecture presentation 4
Anoushiravan M. Ghamsari
 
PDF
PRETZEL: Opening the Black Box of Machine Learning Prediction Serving Systems
NECST Lab @ Politecnico di Milano
 
PPTX
CS8494 SOFTWARE ENGINEERING Unit-5
SIMONTHOMAS S
 
PPTX
CSC 204 PASSES IN COMPILER CONSTURCTION.pptx
ZulukhaniniTijani
 
PDF
A WEB BASED APPLICATION FOR RESUME PARSER USING NATURAL LANGUAGE PROCESSING T...
IRJET Journal
 
PPTX
N - Tier Applications, Enterprise Java Beans, Component technologies
Martin A
 
PDF
MongoDB World 2018: Data Models for Storing Sophisticated Customer Journeys i...
MongoDB
 
PDF
Managing Large Flask Applications On Google App Engine (GAE)
Emmanuel Olowosulu
 
ProgrammingPrimerAndOOPS
sunmitraeducation
 
PROCEDURAL ORIENTED PROGRAMMING VS OBJECT ORIENTED PROGRAMING
Uttam Singh
 
73d32 session1 c++
Mukund Trivedi
 
Intro To C++ - Class 14 - Midterm Review
Blue Elephant Consulting
 
Basic concepts of parallelization
snegacmr
 
Continuous delivery for machine learning
Rajesh Muppalla
 
Intro to C++ - Class 2 - Objects & Classes
Blue Elephant Consulting
 
Intro To C++ - Class 2 - An Introduction To C++
Blue Elephant Consulting
 
Resume
Tarun1990
 
Aa03101540158
ijceronline
 
Programming using C++ - slides.pptx
HeadoftheDepartment
 
Architecture presentation 4
Anoushiravan M. Ghamsari
 
PRETZEL: Opening the Black Box of Machine Learning Prediction Serving Systems
NECST Lab @ Politecnico di Milano
 
CS8494 SOFTWARE ENGINEERING Unit-5
SIMONTHOMAS S
 
CSC 204 PASSES IN COMPILER CONSTURCTION.pptx
ZulukhaniniTijani
 
A WEB BASED APPLICATION FOR RESUME PARSER USING NATURAL LANGUAGE PROCESSING T...
IRJET Journal
 
N - Tier Applications, Enterprise Java Beans, Component technologies
Martin A
 
MongoDB World 2018: Data Models for Storing Sophisticated Customer Journeys i...
MongoDB
 
Managing Large Flask Applications On Google App Engine (GAE)
Emmanuel Olowosulu
 
Ad

More from MrShahbazRafiq (7)

PPTX
Principles of syllabus organizationt
MrShahbazRafiq
 
PPTX
Course planning and syllabus design
MrShahbazRafiq
 
PPTX
Syllabus design and materials development
MrShahbazRafiq
 
PPTX
Product oriented syllabus
MrShahbazRafiq
 
PPTX
Process oriented syllabus
MrShahbazRafiq
 
PPT
course and syllabus design
MrShahbazRafiq
 
PPTX
Course planning ands yllabusdesign
MrShahbazRafiq
 
Principles of syllabus organizationt
MrShahbazRafiq
 
Course planning and syllabus design
MrShahbazRafiq
 
Syllabus design and materials development
MrShahbazRafiq
 
Product oriented syllabus
MrShahbazRafiq
 
Process oriented syllabus
MrShahbazRafiq
 
course and syllabus design
MrShahbazRafiq
 
Course planning ands yllabusdesign
MrShahbazRafiq
 

Recently uploaded (20)

PDF
5.EXPLORING-FORCES-Detailed-Notes.pdf/8TH CLASS SCIENCE CURIOSITY
Sandeep Swamy
 
PDF
UTS Health Student Promotional Representative_Position Description.pdf
Faculty of Health, University of Technology Sydney
 
PDF
Phylum Arthropoda: Characteristics and Classification, Entomology Lecture
Miraj Khan
 
PPTX
Tips Management in Odoo 18 POS - Odoo Slides
Celine George
 
PPTX
family health care settings home visit - unit 6 - chn 1 - gnm 1st year.pptx
Priyanshu Anand
 
PPTX
How to Manage Global Discount in Odoo 18 POS
Celine George
 
PPTX
CARE OF UNCONSCIOUS PATIENTS .pptx
AneetaSharma15
 
PPTX
ACUTE NASOPHARYNGITIS. pptx
AneetaSharma15
 
PPTX
Care of patients with elImination deviation.pptx
AneetaSharma15
 
PPTX
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
PPTX
PPTs-The Rise of Empiresghhhhhhhh (1).pptx
academysrusti114
 
PDF
What is CFA?? Complete Guide to the Chartered Financial Analyst Program
sp4989653
 
PPTX
Information Texts_Infographic on Forgetting Curve.pptx
Tata Sevilla
 
PDF
Exploring-Forces 5.pdf/8th science curiosity/by sandeep swamy notes/ppt
Sandeep Swamy
 
PPTX
Software Engineering BSC DS UNIT 1 .pptx
Dr. Pallawi Bulakh
 
PPTX
Nursing Management of Patients with Disorders of Ear, Nose, and Throat (ENT) ...
RAKESH SAJJAN
 
PPTX
HISTORY COLLECTION FOR PSYCHIATRIC PATIENTS.pptx
PoojaSen20
 
PDF
2.Reshaping-Indias-Political-Map.ppt/pdf/8th class social science Exploring S...
Sandeep Swamy
 
PDF
3.The-Rise-of-the-Marathas.pdfppt/pdf/8th class social science Exploring Soci...
Sandeep Swamy
 
PPTX
Strengthening open access through collaboration: building connections with OP...
Jisc
 
5.EXPLORING-FORCES-Detailed-Notes.pdf/8TH CLASS SCIENCE CURIOSITY
Sandeep Swamy
 
UTS Health Student Promotional Representative_Position Description.pdf
Faculty of Health, University of Technology Sydney
 
Phylum Arthropoda: Characteristics and Classification, Entomology Lecture
Miraj Khan
 
Tips Management in Odoo 18 POS - Odoo Slides
Celine George
 
family health care settings home visit - unit 6 - chn 1 - gnm 1st year.pptx
Priyanshu Anand
 
How to Manage Global Discount in Odoo 18 POS
Celine George
 
CARE OF UNCONSCIOUS PATIENTS .pptx
AneetaSharma15
 
ACUTE NASOPHARYNGITIS. pptx
AneetaSharma15
 
Care of patients with elImination deviation.pptx
AneetaSharma15
 
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
PPTs-The Rise of Empiresghhhhhhhh (1).pptx
academysrusti114
 
What is CFA?? Complete Guide to the Chartered Financial Analyst Program
sp4989653
 
Information Texts_Infographic on Forgetting Curve.pptx
Tata Sevilla
 
Exploring-Forces 5.pdf/8th science curiosity/by sandeep swamy notes/ppt
Sandeep Swamy
 
Software Engineering BSC DS UNIT 1 .pptx
Dr. Pallawi Bulakh
 
Nursing Management of Patients with Disorders of Ear, Nose, and Throat (ENT) ...
RAKESH SAJJAN
 
HISTORY COLLECTION FOR PSYCHIATRIC PATIENTS.pptx
PoojaSen20
 
2.Reshaping-Indias-Political-Map.ppt/pdf/8th class social science Exploring S...
Sandeep Swamy
 
3.The-Rise-of-the-Marathas.pdfppt/pdf/8th class social science Exploring Soci...
Sandeep Swamy
 
Strengthening open access through collaboration: building connections with OP...
Jisc
 

Procedure oriented programming

  • 1. Procedure Oriented Programming • It means “a set of procedures” which is a “set of subroutines” or a “set of functions“. • functions are called repeatedly in a program to execute/complete tasks performed by them. For example, a program may involve collecting data from user (reading), performing some kind of calculations on the collected data (calculation), and finally displaying the result to the user when requested (printing). All the 3 tasks of reading, calculating and printing can be written in a program with the help of 3 different functions which performs these 3 different tasks.
  • 2. A Real-World Example • Let's say that you are working for a vehicle parts manufacturer that needs to update it's online inventory system. Your boss tells you to program two similar but separate forms for a website, one form that processes information about cars and one that does the same for trucks. • For cars, we will need to record the following information: Color, Engine Size, Transmission Type, Number of doors • For trucks, the information will be similar, but slightly different. We need: Color, Engine Size, Transmission Type, Cab Size, Towing Capacity
  • 3. Scenario 1 • Suppose that we suddenly need to add a bus form, that records the following information: Color, Engine Size, Transmission Type Number of passengers • Procedural: We need to recreate the entire form, repeating the code for Color, Engine Size, and Transmission Type. • OOP: We simply extend the vehicle class with a bus class and add the method, number Of Passengers.
  • 4. Scenario 2 • Instead of storing color in a database like we previously did, for some strange reason our client wants the color emailed to him. • Procedural: We change three different forms: cars, trucks, and buses to email the color to the client rather than storing it in the database. • OOP: We change the color method in the vehicle class and because the car, truck, and bus classes all extend (or inherit from, to put it another way) the vehicle class, they are automatically updated.
  • 5. Scenario 3 • We want to move from a car to specific makes, for example: Nissan and Mazda. • Procedural: We create a new form for each make, repeating all of the code for car information and adding the code specific to each make. • OOP: We extend the car class with a Nissan class and a Mazda class and add methods for each set of unique information for that car make.
  • 6. Procedural vs. Object-Oriented Programming POP OOP In POP, program is divided into small parts called functions. In OOP, program is divided into parts called objects. POP does not have any proper way for hiding data so it is less secure. OOP provides Data Hiding so provides more security. Example of POP are : C, VB, FORTRAN, Pascal. Example of OOP are : C++, JAVA, VB.NET, C#.NET.
  • 7. Procedur al: Top down design Global data focused Limited code reuse Complex code Object-Oriented: Object focused design Protected data Code reuse Complex design VS . Procedural vs. Object-Oriented Programming
  • 8. Object Oriented Methodology is a certain process through which software can be developed. The goals of this methodology are to achieve Software Systems that are reliable, reusable, extensible; hence, more useful in the long run. The methodology achieves its goals by the help of a collection of objects that communicate by exchanging messages.
  • 9. Object s • Hence, every o Towards a higher level of abstraction bject has 3 important features – 1. Characteristics (e.g. Name, Designation, Job description etc.) – 2. Responsibilities (e.g. drive bus, fly plane etc.) – these are assigned on the basis of the object’s characteristics – A manager object would have different responsibilities than a developer, since their job descriptions (a characteristic) would be different: – 3. Relationships with other objects (explained in detail later) – in order to send requests/messages to each other, objects need to have some relationship/connection. E.g. A bus driver needs to have access/connection to a bus in order to drive it.
  • 10. Class es • Exercise: What class/category do these objects belong to? – Pencils, erasers, pens, rulers, sharpeners? – Bananas, apples, oranges, peaches, grapes? – Alice, Bob, Mark, Fahd, Ali, Brian? • Guideline: A class usually represents a noun