SlideShare a Scribd company logo
2
Most read
3
Most read
6
Most read
Object
Oriented
Programming
POP
� Procedure-oriented programming (POP) is a programming paradigm or
style that is centered around procedures or functions. In procedure-oriented
programming, a program is divided into a set of procedures or functions, and
these procedures are responsible for performing specific tasks or operations.
� The focus is on breaking down the problem into smaller sub-tasks, with
each procedure handling one specific aspect of the problem.
� POP uses a sequence of instructions to break down the program into
functions, and each task is completed in order.
OOP
� Object-oriented programming (OOP) is a computer programming model that organizes
software design around data, or objects, rather than functions and logic. An object can be
defined as a data field that has unique attributes and behavior.
� OOP focuses on the objects that developers want to manipulate rather than the logic
required to manipulate them. This approach to programming is well-suited for programs that
are large, complex and actively updated or maintained.
� For example, OOP can be used for manufacturing system simulation software.
Figure: Objects in Object Oriented Programming
Object 1 Object 2
Public Method
Private Data
Private Methods
Public Method
Private Data
Private Methods
Communication
Benefits of OOPs over POP
⚽ Through inheritance, we can eliminate code and extend the use of existing classes.
⚽ Reusability.
⚽Easy to understand.
⚽Models the real world well.
⚽The principle ofdata hiding helps the programmer to build secure programs.
⚽Software complexity can be easily managed.
Basic Concepts of Object-Oriented Programming
• Classes
• Objects
• Encapsulation
• Inheritance
• Polymorphism
• Dynamic Binding
• Message Passing
Main Five Pillars of OOP concept
Objects
Inheritance
Class
Encaptulation
Polymorphism
CLASS
• A class is a blueprint or template for creating objects (instances).
• It defines the structure and behavior that the objects created from it will have.
• A class encapsulates data (attributes or properties) and methods (functions or procedures)
that operate on that data.
• A class specification has two parts:
1. Class Declaration
2. Class Function Definitions
Class Structure
class <class_name>
{
private:
variable declaration;
function declaration;
public:
variable declaration;
function declaration
}
Class Structure
class item
{
private:
int number;
float cost;
public:
get data (int a, float b);
putdata (void);
}
OBJECT
• Objects are the basic rin-time entities of an object oriented system.
• They may represent a person, a place or any item that the program must. handle.
• Example:
Figure: Representation of Object
An Object
A Car
• Start
• Move
• Stop
An Object A Car
• Start
• Move
• Stop
• Model
• Year of Mfg
• Colour
Data Members
Functions
ENCAPTULATION
• Encapsulation is one of the fundamental concepts in object-oriented programming (OOP).
• It refers to the bundling of data (attributes) and the methods (functions) that operate on that
data into a single unit known as a class.
• The purpose of encapsulation is to hide the internal details of how a class works and expose
a well-defined interface for interacting with the class.
• Features of Encapsulation:
1. Data Hiding
2. Access Control
3. Abstraction
4. Code Reusability Methods Variables
INHERITANCE
• The mechanism of deriving a new classfrom an old class is called inheritance or derivation.
• The old class is known as base class while new class is known as derived class or sub class.
• The inheritance is the most powerful features of OOP.
• Through Inheritance use of inheritance, you can save lot of timein your programming and also reduce
errors.
• It helps to reuse functionality.
The different types of inheritance are:
1. Single Inheritance:
• In a Single inheritance, one class is derived from another class.
• That is, there is only one base class and one derived class.
Base Class
Derived Class
2. Multiple Inheritence:
Ad

Recommended

OOPs in Java
OOPs in Java
Ranjith Sekar
 
MySQLからPostgreSQLへのマイグレーションのハマリ所
MySQLからPostgreSQLへのマイグレーションのハマリ所
Makoto Kaga
 
Spring Framework ふりかえりと4.3新機能
Spring Framework ふりかえりと4.3新機能
kimulla
 
Association agggregation and composition
Association agggregation and composition
baabtra.com - No. 1 supplier of quality freshers
 
もしOracleDBAがMySQLを管理することになったときの注意点など
もしOracleDBAがMySQLを管理することになったときの注意点など
Kentaro Kitagawa
 
OOP Unit 1 - Foundation of Object- Oriented Programming
OOP Unit 1 - Foundation of Object- Oriented Programming
dkpawar
 
Java Collection Framework
Java Collection Framework
Lakshmi R
 
Different approaches to software design
Different approaches to software design
Sandeep Kumar Nayak
 
Multithreading in java
Multithreading in java
Lovely Professional University
 
UNIT II DBMS.pptx
UNIT II DBMS.pptx
NIVETHA37590
 
Network topology
Network topology
ArjonDando1
 
Principles and advantages of oop ppt
Principles and advantages of oop ppt
daxesh chauhan
 
HTML and XML Difference FAQs
HTML and XML Difference FAQs
Umar Ali
 
Multithreading In Java
Multithreading In Java
parag
 
concept of oops
concept of oops
prince sharma
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Erin M. Kidwell
 
Object-Oriented Programming Concepts
Object-Oriented Programming Concepts
Kwangshin Oh
 
Cloud Computing Architecture
Cloud Computing Architecture
Vasu Jain
 
Class and object
Class and object
Prof. Dr. K. Adisesha
 
Multithreading in-java
Multithreading in-java
aalipalh
 
Network switches, functions & role in networks
Network switches, functions & role in networks
IT Tech
 
Basic Data Types in C++
Basic Data Types in C++
Hridoy Bepari
 
Xml applications
Xml applications
Nabahat Tahir
 
Understanding Cloud Computing
Understanding Cloud Computing
Mohammed Sajjad Ali
 
Multithreading in java
Multithreading in java
Raghu nath
 
OOP-1.pptx
OOP-1.pptx
iansebuabeh
 
Templates
Templates
Pranali Chaudhari
 
Wrapper classes
Wrapper classes
Kongu Engineering College, Perundurai, Erode
 
object oriented programming and methodology.pptx
object oriented programming and methodology.pptx
ayush626953
 
UNIT1- OBJECT ORIENTED PROGRAMMING IN JAVA- AIML IT-SPPU
UNIT1- OBJECT ORIENTED PROGRAMMING IN JAVA- AIML IT-SPPU
ApurvaLaddha
 

More Related Content

What's hot (20)

Multithreading in java
Multithreading in java
Lovely Professional University
 
UNIT II DBMS.pptx
UNIT II DBMS.pptx
NIVETHA37590
 
Network topology
Network topology
ArjonDando1
 
Principles and advantages of oop ppt
Principles and advantages of oop ppt
daxesh chauhan
 
HTML and XML Difference FAQs
HTML and XML Difference FAQs
Umar Ali
 
Multithreading In Java
Multithreading In Java
parag
 
concept of oops
concept of oops
prince sharma
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Erin M. Kidwell
 
Object-Oriented Programming Concepts
Object-Oriented Programming Concepts
Kwangshin Oh
 
Cloud Computing Architecture
Cloud Computing Architecture
Vasu Jain
 
Class and object
Class and object
Prof. Dr. K. Adisesha
 
Multithreading in-java
Multithreading in-java
aalipalh
 
Network switches, functions & role in networks
Network switches, functions & role in networks
IT Tech
 
Basic Data Types in C++
Basic Data Types in C++
Hridoy Bepari
 
Xml applications
Xml applications
Nabahat Tahir
 
Understanding Cloud Computing
Understanding Cloud Computing
Mohammed Sajjad Ali
 
Multithreading in java
Multithreading in java
Raghu nath
 
OOP-1.pptx
OOP-1.pptx
iansebuabeh
 
Templates
Templates
Pranali Chaudhari
 
Wrapper classes
Wrapper classes
Kongu Engineering College, Perundurai, Erode
 
Network topology
Network topology
ArjonDando1
 
Principles and advantages of oop ppt
Principles and advantages of oop ppt
daxesh chauhan
 
HTML and XML Difference FAQs
HTML and XML Difference FAQs
Umar Ali
 
Multithreading In Java
Multithreading In Java
parag
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Erin M. Kidwell
 
Object-Oriented Programming Concepts
Object-Oriented Programming Concepts
Kwangshin Oh
 
Cloud Computing Architecture
Cloud Computing Architecture
Vasu Jain
 
Multithreading in-java
Multithreading in-java
aalipalh
 
Network switches, functions & role in networks
Network switches, functions & role in networks
IT Tech
 
Basic Data Types in C++
Basic Data Types in C++
Hridoy Bepari
 
Multithreading in java
Multithreading in java
Raghu nath
 

Similar to Object Oriented Program Class 12 Computer Science (20)

object oriented programming and methodology.pptx
object oriented programming and methodology.pptx
ayush626953
 
UNIT1- OBJECT ORIENTED PROGRAMMING IN JAVA- AIML IT-SPPU
UNIT1- OBJECT ORIENTED PROGRAMMING IN JAVA- AIML IT-SPPU
ApurvaLaddha
 
Object oriented programming
Object oriented programming
sana younas
 
Ch 1 Introduction to Object Oriented Programming.pptx
Ch 1 Introduction to Object Oriented Programming.pptx
MahiDivya
 
Procedural-vs-Object-Oriented-Programming (1).pdf
Procedural-vs-Object-Oriented-Programming (1).pdf
AnujMalviya12
 
Principles of OOPs.pptx
Principles of OOPs.pptx
LakshyaChauhan21
 
oop.pptx
oop.pptx
KabitaParajuli3
 
object oriented programing lecture 1
object oriented programing lecture 1
Geophery sanga
 
POP vs OOP Introduction
POP vs OOP Introduction
Hashni T
 
Object Oriented Programming.pptx its a opps concept in c++ which is helpful
Object Oriented Programming.pptx its a opps concept in c++ which is helpful
vidhimangal05
 
Object Oriented Programming using c++ main four piller in this
Object Oriented Programming using c++ main four piller in this
vidhimangal05
 
Introduction to oops concepts
Introduction to oops concepts
Nilesh Dalvi
 
IET307 OOP - object oriented programming concepts.pptx
IET307 OOP - object oriented programming concepts.pptx
BasithAb2
 
2 Object Oriented Programming
2 Object Oriented Programming
Praveen M Jigajinni
 
PPT_Object Oriented Programming .pptx
PPT_Object Oriented Programming .pptx
MDFARHAN3070
 
PPT_Object Oriented Programming (2).pptx
PPT_Object Oriented Programming (2).pptx
faizus786
 
OBJECT ORIENTED PROGRAMMING CONCEPTS IN C++.pptx
OBJECT ORIENTED PROGRAMMING CONCEPTS IN C++.pptx
Maharshi Dayanand University Rohtak
 
CPP_,module2_1.pptx
CPP_,module2_1.pptx
AbhilashTom4
 
Object oriented programming (oops) python
Object oriented programming (oops) python
TayyabaIrshad6
 
Intro to oop.pptx
Intro to oop.pptx
UmerUmer25
 
object oriented programming and methodology.pptx
object oriented programming and methodology.pptx
ayush626953
 
UNIT1- OBJECT ORIENTED PROGRAMMING IN JAVA- AIML IT-SPPU
UNIT1- OBJECT ORIENTED PROGRAMMING IN JAVA- AIML IT-SPPU
ApurvaLaddha
 
Object oriented programming
Object oriented programming
sana younas
 
Ch 1 Introduction to Object Oriented Programming.pptx
Ch 1 Introduction to Object Oriented Programming.pptx
MahiDivya
 
Procedural-vs-Object-Oriented-Programming (1).pdf
Procedural-vs-Object-Oriented-Programming (1).pdf
AnujMalviya12
 
object oriented programing lecture 1
object oriented programing lecture 1
Geophery sanga
 
POP vs OOP Introduction
POP vs OOP Introduction
Hashni T
 
Object Oriented Programming.pptx its a opps concept in c++ which is helpful
Object Oriented Programming.pptx its a opps concept in c++ which is helpful
vidhimangal05
 
Object Oriented Programming using c++ main four piller in this
Object Oriented Programming using c++ main four piller in this
vidhimangal05
 
Introduction to oops concepts
Introduction to oops concepts
Nilesh Dalvi
 
IET307 OOP - object oriented programming concepts.pptx
IET307 OOP - object oriented programming concepts.pptx
BasithAb2
 
PPT_Object Oriented Programming .pptx
PPT_Object Oriented Programming .pptx
MDFARHAN3070
 
PPT_Object Oriented Programming (2).pptx
PPT_Object Oriented Programming (2).pptx
faizus786
 
CPP_,module2_1.pptx
CPP_,module2_1.pptx
AbhilashTom4
 
Object oriented programming (oops) python
Object oriented programming (oops) python
TayyabaIrshad6
 
Intro to oop.pptx
Intro to oop.pptx
UmerUmer25
 
Ad

Recently uploaded (20)

What is FIle and explanation of text files.pptx
What is FIle and explanation of text files.pptx
Ramakrishna Reddy Bijjam
 
Plate Tectonic Boundaries and Continental Drift Theory
Plate Tectonic Boundaries and Continental Drift Theory
Marie
 
Paper 107 | From Watchdog to Lapdog: Ishiguro’s Fiction and the Rise of “Godi...
Paper 107 | From Watchdog to Lapdog: Ishiguro’s Fiction and the Rise of “Godi...
Rajdeep Bavaliya
 
Introduction to Generative AI and Copilot.pdf
Introduction to Generative AI and Copilot.pdf
TechSoup
 
How to Configure Vendor Management in Lunch App of Odoo 18
How to Configure Vendor Management in Lunch App of Odoo 18
Celine George
 
Overview of Employee in Odoo 18 - Odoo Slides
Overview of Employee in Odoo 18 - Odoo Slides
Celine George
 
How to Manage Upselling of Subscriptions in Odoo 18
How to Manage Upselling of Subscriptions in Odoo 18
Celine George
 
How to Manage Inventory Movement in Odoo 18 POS
How to Manage Inventory Movement in Odoo 18 POS
Celine George
 
Paper 108 | Thoreau’s Influence on Gandhi: The Evolution of Civil Disobedience
Paper 108 | Thoreau’s Influence on Gandhi: The Evolution of Civil Disobedience
Rajdeep Bavaliya
 
JHS SHS Back to School 2024-2025 .pptx
JHS SHS Back to School 2024-2025 .pptx
melvinapay78
 
Exploring Ocean Floor Features for Middle School
Exploring Ocean Floor Features for Middle School
Marie
 
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
razelitouali
 
Overview of Off Boarding in Odoo 18 Employees
Overview of Off Boarding in Odoo 18 Employees
Celine George
 
Assisting Individuals and Families to Promote and Maintain Health – Unit 7 | ...
Assisting Individuals and Families to Promote and Maintain Health – Unit 7 | ...
RAKESH SAJJAN
 
The Man In The Back – Exceptional Delaware.pdf
The Man In The Back – Exceptional Delaware.pdf
dennisongomezk
 
FEBA Sofia Univercity final diplian v3 GSDG 5.2025.pdf
FEBA Sofia Univercity final diplian v3 GSDG 5.2025.pdf
ChristinaFortunova
 
Basic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Basic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Restu Bias Primandhika
 
SPENT QUIZ NQL JR FEST 5.0 BY SOURAV.pptx
SPENT QUIZ NQL JR FEST 5.0 BY SOURAV.pptx
Sourav Kr Podder
 
Publishing Your Memoir with Brooke Warner
Publishing Your Memoir with Brooke Warner
Brooke Warner
 
Nice Dream.pdf /
Nice Dream.pdf /
ErinUsher3
 
What is FIle and explanation of text files.pptx
What is FIle and explanation of text files.pptx
Ramakrishna Reddy Bijjam
 
Plate Tectonic Boundaries and Continental Drift Theory
Plate Tectonic Boundaries and Continental Drift Theory
Marie
 
Paper 107 | From Watchdog to Lapdog: Ishiguro’s Fiction and the Rise of “Godi...
Paper 107 | From Watchdog to Lapdog: Ishiguro’s Fiction and the Rise of “Godi...
Rajdeep Bavaliya
 
Introduction to Generative AI and Copilot.pdf
Introduction to Generative AI and Copilot.pdf
TechSoup
 
How to Configure Vendor Management in Lunch App of Odoo 18
How to Configure Vendor Management in Lunch App of Odoo 18
Celine George
 
Overview of Employee in Odoo 18 - Odoo Slides
Overview of Employee in Odoo 18 - Odoo Slides
Celine George
 
How to Manage Upselling of Subscriptions in Odoo 18
How to Manage Upselling of Subscriptions in Odoo 18
Celine George
 
How to Manage Inventory Movement in Odoo 18 POS
How to Manage Inventory Movement in Odoo 18 POS
Celine George
 
Paper 108 | Thoreau’s Influence on Gandhi: The Evolution of Civil Disobedience
Paper 108 | Thoreau’s Influence on Gandhi: The Evolution of Civil Disobedience
Rajdeep Bavaliya
 
JHS SHS Back to School 2024-2025 .pptx
JHS SHS Back to School 2024-2025 .pptx
melvinapay78
 
Exploring Ocean Floor Features for Middle School
Exploring Ocean Floor Features for Middle School
Marie
 
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
razelitouali
 
Overview of Off Boarding in Odoo 18 Employees
Overview of Off Boarding in Odoo 18 Employees
Celine George
 
Assisting Individuals and Families to Promote and Maintain Health – Unit 7 | ...
Assisting Individuals and Families to Promote and Maintain Health – Unit 7 | ...
RAKESH SAJJAN
 
The Man In The Back – Exceptional Delaware.pdf
The Man In The Back – Exceptional Delaware.pdf
dennisongomezk
 
FEBA Sofia Univercity final diplian v3 GSDG 5.2025.pdf
FEBA Sofia Univercity final diplian v3 GSDG 5.2025.pdf
ChristinaFortunova
 
Basic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Basic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Restu Bias Primandhika
 
SPENT QUIZ NQL JR FEST 5.0 BY SOURAV.pptx
SPENT QUIZ NQL JR FEST 5.0 BY SOURAV.pptx
Sourav Kr Podder
 
Publishing Your Memoir with Brooke Warner
Publishing Your Memoir with Brooke Warner
Brooke Warner
 
Nice Dream.pdf /
Nice Dream.pdf /
ErinUsher3
 
Ad

Object Oriented Program Class 12 Computer Science

  • 2. POP � Procedure-oriented programming (POP) is a programming paradigm or style that is centered around procedures or functions. In procedure-oriented programming, a program is divided into a set of procedures or functions, and these procedures are responsible for performing specific tasks or operations. � The focus is on breaking down the problem into smaller sub-tasks, with each procedure handling one specific aspect of the problem. � POP uses a sequence of instructions to break down the program into functions, and each task is completed in order.
  • 3. OOP � Object-oriented programming (OOP) is a computer programming model that organizes software design around data, or objects, rather than functions and logic. An object can be defined as a data field that has unique attributes and behavior. � OOP focuses on the objects that developers want to manipulate rather than the logic required to manipulate them. This approach to programming is well-suited for programs that are large, complex and actively updated or maintained. � For example, OOP can be used for manufacturing system simulation software.
  • 4. Figure: Objects in Object Oriented Programming Object 1 Object 2 Public Method Private Data Private Methods Public Method Private Data Private Methods Communication
  • 5. Benefits of OOPs over POP ⚽ Through inheritance, we can eliminate code and extend the use of existing classes. ⚽ Reusability. ⚽Easy to understand. ⚽Models the real world well. ⚽The principle ofdata hiding helps the programmer to build secure programs. ⚽Software complexity can be easily managed.
  • 6. Basic Concepts of Object-Oriented Programming • Classes • Objects • Encapsulation • Inheritance • Polymorphism • Dynamic Binding • Message Passing Main Five Pillars of OOP concept Objects Inheritance Class Encaptulation Polymorphism
  • 7. CLASS • A class is a blueprint or template for creating objects (instances). • It defines the structure and behavior that the objects created from it will have. • A class encapsulates data (attributes or properties) and methods (functions or procedures) that operate on that data. • A class specification has two parts: 1. Class Declaration 2. Class Function Definitions Class Structure class <class_name> { private: variable declaration; function declaration; public: variable declaration; function declaration } Class Structure class item { private: int number; float cost; public: get data (int a, float b); putdata (void); }
  • 8. OBJECT • Objects are the basic rin-time entities of an object oriented system. • They may represent a person, a place or any item that the program must. handle. • Example: Figure: Representation of Object An Object A Car • Start • Move • Stop An Object A Car • Start • Move • Stop • Model • Year of Mfg • Colour Data Members Functions
  • 9. ENCAPTULATION • Encapsulation is one of the fundamental concepts in object-oriented programming (OOP). • It refers to the bundling of data (attributes) and the methods (functions) that operate on that data into a single unit known as a class. • The purpose of encapsulation is to hide the internal details of how a class works and expose a well-defined interface for interacting with the class. • Features of Encapsulation: 1. Data Hiding 2. Access Control 3. Abstraction 4. Code Reusability Methods Variables
  • 10. INHERITANCE • The mechanism of deriving a new classfrom an old class is called inheritance or derivation. • The old class is known as base class while new class is known as derived class or sub class. • The inheritance is the most powerful features of OOP. • Through Inheritance use of inheritance, you can save lot of timein your programming and also reduce errors. • It helps to reuse functionality.
  • 11. The different types of inheritance are: 1. Single Inheritance: • In a Single inheritance, one class is derived from another class. • That is, there is only one base class and one derived class. Base Class Derived Class