SlideShare a Scribd company logo
Procedure-Oriented Programming
vs
Object Oriented Programming
Programming Language : Definition
A vocabulary and set of grammatical rules for
instructing a computer to perform specific tasks.
Programming Languages
Programmer use Programming languages to develop the
software.
The three major families of languages are:
oMachine languages
oAssembly languages
oHigh-Level languages
Machine Languages
Comprised of 1s and 0s
The “native” language of a computer
Difficult to program – one misplaced 1 or 0 will cause the
program to fail.
Example of code:
1110100010101 111010101110
Assembly Languages
Assembly languages are a step towards easier programming.
Assembly languages are comprised of a set of elemental
commands. (MNEMONICS)
Assembly language code needs to be translated to machine
language before the computer processes it.
Example:
LOAD BASEPAY
ADD OVERPAY
STORE GROSSPAY
High-Level Languages
High-level languages represent a giant leap towards
easier programming. The syntax of HL languages is
similar to English.
Historically, we divide HL languages into two
groups:
Procedural Oriented Programming
Object-Oriented Programming (OOP)
Procedure-Oriented Programming
Large programs are divided into Smaller Programs know as function.
Most of the functions share global data.
Data move openly around the system from function to function.
Top-down approach in program design.
Object -Oriented Programming
Striking feature
Programs are divided into what are known as objects.
Data is hidden and cannot be accessed by external functions.
Program can be easily extend whenever necessary.
Bottom-up approach in program design.
 Structured programming enable programmers
to write moderately complex programs fairly
easily.
 However as the programs grew larger, even the
structured approach failed to show the desired
results in terms of bug-free, easy-to-maintain
and reusable programs.
 Object-Oriented Programming (OOP) is an
appraoch to program organization and
development that attempts to elimate some of
the pitfalls of conventional programming
methods by incorporating the best of structured
programming features with several powerful
new concepts.
Procedure-Oriented Programming
 Conventional programming using high level
language such as COBOL, FORTRAN and C is
commonly known as Procedure-oriented
programming.
 In the Procedure-oriented approach the
problem is viewed as a sequence of things to
be done.
 The primary focus is on functions.
Structure of Procedure-oriented
Main Program
Function 1 Function 2 Function 3
Function 5
Function 4
Procedure-Oriented Programming
 Procudure-oriented programming basically
consists of writing a list of instructions for the
computer to follow and organizing these
instructions into groups known as functions.
Structure of Procedure-oriented
Global data
Function 2
Global data
Function 3
Function 1
Local data Local data Local data
Procedure-Oriented Programming
 What happens to data? How are they affected
by the functions that work on them?
 In multi-function program many important data
items are placed as global so that they may be
accessed by all the functions.Each function may
have its own local data.
 In large program it is very difficult to identify
what data is used by which function. In case we
need to revise an external data structure we
also need to revise all function that access it.
Object-Oriented Programming
 OOP treats data as a critical element in the
program development and does not allow it to
flow freely around the system.
 It ties data more closely to the functions that
operate on it, and protects it from accidental
modification from outside functions.
 OOP allows decomposition of a problem into a
number of entites called objects.
Organization of data & function OOP
Data
Functions
Data
Functions
Data
Functions
Object C
ObjectA Object B
Basic concepts of OOP
 Objects
 Class
 Data Abstration
 Encapsulation
 Inheritance
 Polyomorphism
 Dynamic binding
 Message Passing
The three pillars of object-oriented development:
 Encapsulation, Inheritance, and Polymorphism.
Object
Object is a real world entity, for example, chair, car, pen, mobile,
laptop etc.
In other words, object is an entity that has state and behavior.
Here, state means data and behavior means functionality.
Object is a runtime entity, it is created at runtime.
Object is an instance of a class. All the members of the class can
be accessed through object.
Let's see an example to create object of student class using
s1 as the reference variable.
Student s1; //creating an object of Student
Object Example
Object and Class
Class
Class is a model for creating objects.
A class is the building block, that leads to Object-Oriented
programming.
A class is thus a collection of objects of similar types.
 It is a user-defined data type, which holds its own data members and
member functions, which can be accessed and used by creating an
instance of that class.
A class is like a blueprint for an object or blueprint for
creating objects (a particular data structure), providing initial values for
state (member variables or attributes), and implementations of behavior
(member functions or methods).
Class
Class is a template from which objects are created. It can have
fields, methods.
The user-defined objects are created using the class keyword.
 The class is a blueprint that defines a nature of a future object.
An instance is a specific object created from a particular
class. Classes are used to create and manage new objects and
support inheritance—a key ingredient in object-oriented
programming and a mechanism of reusing code
Classes
 Once a class has been defined we can create any
number of objects belonging to that class.
POP vs OOP Introduction
POP vs OOP Introduction
Classes
 Fruit is a class defined as a Class.
 fruit f1;
 Here fruit is Class.
 And f1 is an object of fruit Class.
Encapsulation
 The wrapping up of data and functions into a single
unit is known as Encapsulation
 The data is not accessible to the outside world and
only those functions which are wrapped in the class
can access it.
 This insulation of the data from direct access by the
called data hiding or information
program is
hiding.
Data Abstraction
 Abstraction refers to the act of representing essential
features without including the background details or
explanations.
 Classes use the concept of abstraction and are
defined as a list of abstract attributes such as size,
weight and cost, and functions to operate on these
functions.
 Since the classes use the concept of data
abstraction, they are known as Abstract Data
Types.
Inheritance
 Inheritance is the process by which objects of one
class acquire the properties of objects of another
class.
 The principle behind this sort of division is that each
derived class shares common characteristics with the
class from which it is derived. (Base class)
 In OOP the concept of inheritance provides the
idea of reusability.
 This means that we can add additional features to an
existing class without modifying it.
Inheritance
 The real power of inheritance mechanism is that it
allows the programmer to reuse a class that is almost
but not exactly, what he wants, and to tailor the class
in such a way that it does not introduce any
undesirable side-effects into the rest of the classes.
Bird
Flying Bird No flying Bird
Polymorphism
 Polymorphism means the ability to take more than one
form.
 That is an operation may exhibit different behaviours
in different instances. The behaviour depends upon
the types of data used in the operation.
Example: Operation of addition.
 For two numbers the operation will generate a sum.
 If the operands are strings, then the operation would
produce a third string by concatenation.
Polymorphism
 The process of making an operator to exhibit different
behaviours in different instances is known as
operator overloading.
 Using a single function name to perform different types
of tasks is known as function overloading.
Dynamic Binding
 Binding refers to the linking of a procedure call to the
code to be executed in response to the call.
 "Binding" means associating a function for a
particular function call.
 Dynamic binding means that the code associated with
a given procedure call is not known until the time of
the call at run-time.
 It is associated with polymorphism and
inheritance.
Message Communication
 An object-oriented program consists of a set of
objects that communicate with each other.
 Object communicate with one another by sending and
receiving information much the same way as people
pass message to one another.
 Message passing involves specifying the name of the
object, the name of the funciton (message) and the
information to be sent.
emp.salary(emp_name);
object
message
information
Benefits of OOP
 Through inheritance we can elimate the redundant
code and extend the use of existing code
 Data hiding helps the programmer to build secure
programs that cannot be invaded by code in other
parts of the program
 It is possible to have mulitple instances of an objects
to co-exist without any interference.
 Easy to partition the work in a project based on objects
Benefits of OOP
 Data-centreddesign approachenables us to capture
more details of a model in implementable form
 Object-oriented systems can be easily upgraded
from small to large systems. Easy to read the code
and debug
 Message passing techniques for communication
between objects makes the interface descriptions with
external systems much simpler.
 Software complexity can be easily managed.

More Related Content

What's hot (20)

PDF
Constructor and Destructor
Kamal Acharya
 
PPTX
Static Members-Java.pptx
ADDAGIRIVENKATARAVIC
 
PPTX
Inheritance in oops
Hirra Sultan
 
PPTX
Basic Concepts of OOPs (Object Oriented Programming in Java)
Michelle Anne Meralpis
 
PPTX
This keyword in java
Hitesh Kumar
 
PDF
Oops concepts || Object Oriented Programming Concepts in Java
Madishetty Prathibha
 
PPT
Java collections concept
kumar gaurav
 
PPT
Introduction to method overloading & method overriding in java hdm
Harshal Misalkar
 
PPTX
Java Constructors
Saumya Som
 
PPTX
Constructor in java
Hitesh Kumar
 
PPTX
Control structures in java
VINOTH R
 
PPTX
Java exception handling
BHUVIJAYAVELU
 
PDF
C++ OOPS Concept
Boopathi K
 
PPTX
OOPS Basics With Example
Thooyavan Venkatachalam
 
PPTX
Classes, objects in JAVA
Abhilash Nair
 
PPT
Method overriding
Azaz Maverick
 
PPTX
INHERITANCE IN JAVA.pptx
NITHISG1
 
PDF
Java threads
Prabhakaran V M
 
PPTX
oops concept in java | object oriented programming in java
CPD INDIA
 
PDF
Arrays in Java
Naz Abdalla
 
Constructor and Destructor
Kamal Acharya
 
Static Members-Java.pptx
ADDAGIRIVENKATARAVIC
 
Inheritance in oops
Hirra Sultan
 
Basic Concepts of OOPs (Object Oriented Programming in Java)
Michelle Anne Meralpis
 
This keyword in java
Hitesh Kumar
 
Oops concepts || Object Oriented Programming Concepts in Java
Madishetty Prathibha
 
Java collections concept
kumar gaurav
 
Introduction to method overloading & method overriding in java hdm
Harshal Misalkar
 
Java Constructors
Saumya Som
 
Constructor in java
Hitesh Kumar
 
Control structures in java
VINOTH R
 
Java exception handling
BHUVIJAYAVELU
 
C++ OOPS Concept
Boopathi K
 
OOPS Basics With Example
Thooyavan Venkatachalam
 
Classes, objects in JAVA
Abhilash Nair
 
Method overriding
Azaz Maverick
 
INHERITANCE IN JAVA.pptx
NITHISG1
 
Java threads
Prabhakaran V M
 
oops concept in java | object oriented programming in java
CPD INDIA
 
Arrays in Java
Naz Abdalla
 

Similar to POP vs OOP Introduction (20)

PPTX
Introduction to oop with c++
Shruti Patel
 
PPTX
Chapter1 introduction
Jeevan Acharya
 
PPTX
IET307 OOP - object oriented programming concepts.pptx
BasithAb2
 
DOC
Chapter1
jammiashok123
 
PDF
UNIT1- OBJECT ORIENTED PROGRAMMING IN JAVA- AIML IT-SPPU
ApurvaLaddha
 
PPTX
SE-IT JAVA LAB OOP CONCEPT
nikshaikh786
 
PPTX
Ch 1 Introduction to Object Oriented Programming.pptx
MahiDivya
 
PPTX
chapterOne.pptxFSdgfqdzwwfagxgghvkjljhcxCZZXvcbx
berihun18
 
DOCX
LECTURE NOTES ON Object Oriented Programming Using C++
SandeepAwasthi15
 
PDF
Computer_Programming_Part_II_Segment_01.pdf
et243047
 
PPT
Basic concept of OOP's
Prof. Dr. K. Adisesha
 
PPTX
Object oriented programming 6 oop with c++
Vaibhav Khanna
 
PPTX
1 intro
abha48
 
PDF
2nd PUC computer science chapter 6 oop concept
Aahwini Esware gowda
 
PDF
Object oriented concepts
Pranali Chaudhari
 
PPTX
principle of oop’s in cpp
gourav kottawar
 
PPTX
OOP-1.pptx
iansebuabeh
 
PPTX
CPP_,module2_1.pptx
AbhilashTom4
 
PPT
Share Unit 1- Basic concept of object-oriented-programming.ppt
hannahrroselin95
 
Introduction to oop with c++
Shruti Patel
 
Chapter1 introduction
Jeevan Acharya
 
IET307 OOP - object oriented programming concepts.pptx
BasithAb2
 
Chapter1
jammiashok123
 
UNIT1- OBJECT ORIENTED PROGRAMMING IN JAVA- AIML IT-SPPU
ApurvaLaddha
 
SE-IT JAVA LAB OOP CONCEPT
nikshaikh786
 
Ch 1 Introduction to Object Oriented Programming.pptx
MahiDivya
 
chapterOne.pptxFSdgfqdzwwfagxgghvkjljhcxCZZXvcbx
berihun18
 
LECTURE NOTES ON Object Oriented Programming Using C++
SandeepAwasthi15
 
Computer_Programming_Part_II_Segment_01.pdf
et243047
 
Basic concept of OOP's
Prof. Dr. K. Adisesha
 
Object oriented programming 6 oop with c++
Vaibhav Khanna
 
1 intro
abha48
 
2nd PUC computer science chapter 6 oop concept
Aahwini Esware gowda
 
Object oriented concepts
Pranali Chaudhari
 
principle of oop’s in cpp
gourav kottawar
 
OOP-1.pptx
iansebuabeh
 
CPP_,module2_1.pptx
AbhilashTom4
 
Share Unit 1- Basic concept of object-oriented-programming.ppt
hannahrroselin95
 
Ad

Recently uploaded (20)

PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Ad

POP vs OOP Introduction

  • 2. Programming Language : Definition A vocabulary and set of grammatical rules for instructing a computer to perform specific tasks.
  • 3. Programming Languages Programmer use Programming languages to develop the software. The three major families of languages are: oMachine languages oAssembly languages oHigh-Level languages
  • 4. Machine Languages Comprised of 1s and 0s The “native” language of a computer Difficult to program – one misplaced 1 or 0 will cause the program to fail. Example of code: 1110100010101 111010101110
  • 5. Assembly Languages Assembly languages are a step towards easier programming. Assembly languages are comprised of a set of elemental commands. (MNEMONICS) Assembly language code needs to be translated to machine language before the computer processes it. Example: LOAD BASEPAY ADD OVERPAY STORE GROSSPAY
  • 6. High-Level Languages High-level languages represent a giant leap towards easier programming. The syntax of HL languages is similar to English. Historically, we divide HL languages into two groups: Procedural Oriented Programming Object-Oriented Programming (OOP)
  • 7. Procedure-Oriented Programming Large programs are divided into Smaller Programs know as function. Most of the functions share global data. Data move openly around the system from function to function. Top-down approach in program design.
  • 8. Object -Oriented Programming Striking feature Programs are divided into what are known as objects. Data is hidden and cannot be accessed by external functions. Program can be easily extend whenever necessary. Bottom-up approach in program design.
  • 9.  Structured programming enable programmers to write moderately complex programs fairly easily.  However as the programs grew larger, even the structured approach failed to show the desired results in terms of bug-free, easy-to-maintain and reusable programs.
  • 10.  Object-Oriented Programming (OOP) is an appraoch to program organization and development that attempts to elimate some of the pitfalls of conventional programming methods by incorporating the best of structured programming features with several powerful new concepts.
  • 11. Procedure-Oriented Programming  Conventional programming using high level language such as COBOL, FORTRAN and C is commonly known as Procedure-oriented programming.  In the Procedure-oriented approach the problem is viewed as a sequence of things to be done.  The primary focus is on functions.
  • 12. Structure of Procedure-oriented Main Program Function 1 Function 2 Function 3 Function 5 Function 4
  • 13. Procedure-Oriented Programming  Procudure-oriented programming basically consists of writing a list of instructions for the computer to follow and organizing these instructions into groups known as functions.
  • 14. Structure of Procedure-oriented Global data Function 2 Global data Function 3 Function 1 Local data Local data Local data
  • 15. Procedure-Oriented Programming  What happens to data? How are they affected by the functions that work on them?  In multi-function program many important data items are placed as global so that they may be accessed by all the functions.Each function may have its own local data.  In large program it is very difficult to identify what data is used by which function. In case we need to revise an external data structure we also need to revise all function that access it.
  • 16. Object-Oriented Programming  OOP treats data as a critical element in the program development and does not allow it to flow freely around the system.  It ties data more closely to the functions that operate on it, and protects it from accidental modification from outside functions.  OOP allows decomposition of a problem into a number of entites called objects.
  • 17. Organization of data & function OOP Data Functions Data Functions Data Functions Object C ObjectA Object B
  • 18. Basic concepts of OOP  Objects  Class  Data Abstration  Encapsulation  Inheritance  Polyomorphism  Dynamic binding  Message Passing The three pillars of object-oriented development:  Encapsulation, Inheritance, and Polymorphism.
  • 19. Object Object is a real world entity, for example, chair, car, pen, mobile, laptop etc. In other words, object is an entity that has state and behavior. Here, state means data and behavior means functionality. Object is a runtime entity, it is created at runtime. Object is an instance of a class. All the members of the class can be accessed through object. Let's see an example to create object of student class using s1 as the reference variable. Student s1; //creating an object of Student
  • 22. Class Class is a model for creating objects. A class is the building block, that leads to Object-Oriented programming. A class is thus a collection of objects of similar types.  It is a user-defined data type, which holds its own data members and member functions, which can be accessed and used by creating an instance of that class. A class is like a blueprint for an object or blueprint for creating objects (a particular data structure), providing initial values for state (member variables or attributes), and implementations of behavior (member functions or methods).
  • 23. Class Class is a template from which objects are created. It can have fields, methods. The user-defined objects are created using the class keyword.  The class is a blueprint that defines a nature of a future object. An instance is a specific object created from a particular class. Classes are used to create and manage new objects and support inheritance—a key ingredient in object-oriented programming and a mechanism of reusing code
  • 24. Classes  Once a class has been defined we can create any number of objects belonging to that class.
  • 27. Classes  Fruit is a class defined as a Class.  fruit f1;  Here fruit is Class.  And f1 is an object of fruit Class.
  • 28. Encapsulation  The wrapping up of data and functions into a single unit is known as Encapsulation  The data is not accessible to the outside world and only those functions which are wrapped in the class can access it.  This insulation of the data from direct access by the called data hiding or information program is hiding.
  • 29. Data Abstraction  Abstraction refers to the act of representing essential features without including the background details or explanations.  Classes use the concept of abstraction and are defined as a list of abstract attributes such as size, weight and cost, and functions to operate on these functions.  Since the classes use the concept of data abstraction, they are known as Abstract Data Types.
  • 30. Inheritance  Inheritance is the process by which objects of one class acquire the properties of objects of another class.  The principle behind this sort of division is that each derived class shares common characteristics with the class from which it is derived. (Base class)  In OOP the concept of inheritance provides the idea of reusability.  This means that we can add additional features to an existing class without modifying it.
  • 31. Inheritance  The real power of inheritance mechanism is that it allows the programmer to reuse a class that is almost but not exactly, what he wants, and to tailor the class in such a way that it does not introduce any undesirable side-effects into the rest of the classes. Bird Flying Bird No flying Bird
  • 32. Polymorphism  Polymorphism means the ability to take more than one form.  That is an operation may exhibit different behaviours in different instances. The behaviour depends upon the types of data used in the operation. Example: Operation of addition.  For two numbers the operation will generate a sum.  If the operands are strings, then the operation would produce a third string by concatenation.
  • 33. Polymorphism  The process of making an operator to exhibit different behaviours in different instances is known as operator overloading.  Using a single function name to perform different types of tasks is known as function overloading.
  • 34. Dynamic Binding  Binding refers to the linking of a procedure call to the code to be executed in response to the call.  "Binding" means associating a function for a particular function call.  Dynamic binding means that the code associated with a given procedure call is not known until the time of the call at run-time.  It is associated with polymorphism and inheritance.
  • 35. Message Communication  An object-oriented program consists of a set of objects that communicate with each other.  Object communicate with one another by sending and receiving information much the same way as people pass message to one another.  Message passing involves specifying the name of the object, the name of the funciton (message) and the information to be sent. emp.salary(emp_name); object message information
  • 36. Benefits of OOP  Through inheritance we can elimate the redundant code and extend the use of existing code  Data hiding helps the programmer to build secure programs that cannot be invaded by code in other parts of the program  It is possible to have mulitple instances of an objects to co-exist without any interference.  Easy to partition the work in a project based on objects
  • 37. Benefits of OOP  Data-centreddesign approachenables us to capture more details of a model in implementable form  Object-oriented systems can be easily upgraded from small to large systems. Easy to read the code and debug  Message passing techniques for communication between objects makes the interface descriptions with external systems much simpler.  Software complexity can be easily managed.