SlideShare a Scribd company logo
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.
Most read
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.
Most read
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
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:

More Related Content

What's hot (20)

Main method in java
Main method in javaMain method in java
Main method in java
Hitesh Kumar
 
Diving in OOP (Day 1) : Polymorphism and Inheritance (Early Binding/Compile T...
Diving in OOP (Day 1) : Polymorphism and Inheritance (Early Binding/Compile T...Diving in OOP (Day 1) : Polymorphism and Inheritance (Early Binding/Compile T...
Diving in OOP (Day 1) : Polymorphism and Inheritance (Early Binding/Compile T...
Akhil Mittal
 
Unit 2 Java
Unit 2 JavaUnit 2 Java
Unit 2 Java
arnold 7490
 
Collections - Lists, Sets
Collections - Lists, Sets Collections - Lists, Sets
Collections - Lists, Sets
Hitesh-Java
 
Retrofit
RetrofitRetrofit
Retrofit
Amin Cheloh
 
Friends function and_classes
Friends function and_classesFriends function and_classes
Friends function and_classes
asadsardar
 
Classes and objects
Classes and objectsClasses and objects
Classes and objects
rajveer_Pannu
 
Activities, Fragments, and Events
Activities, Fragments, and EventsActivities, Fragments, and Events
Activities, Fragments, and Events
Henry Osborne
 
Class template
Class templateClass template
Class template
Kousalya M
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented Programming
Iqra khalil
 
Arrays in java
Arrays in javaArrays in java
Arrays in java
Arzath Areeff
 
Corso ABAP OO 04
Corso ABAP OO  04Corso ABAP OO  04
Corso ABAP OO 04
Piergiorgio Bossù
 
Interface in java
Interface in javaInterface in java
Interface in java
Kavitha713564
 
Structures in c++
Structures in c++Structures in c++
Structures in c++
Swarup Kumar Boro
 
Multiple inheritance in java3 (1).pptx
Multiple inheritance in java3 (1).pptxMultiple inheritance in java3 (1).pptx
Multiple inheritance in java3 (1).pptx
RkGupta83
 
Inner class
Inner classInner class
Inner class
Guna Sekaran
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
Amit Soni (CTFL)
 
Java Notes
Java NotesJava Notes
Java Notes
Abhishek Khune
 
Access specifiers(modifiers) in java
Access specifiers(modifiers) in javaAccess specifiers(modifiers) in java
Access specifiers(modifiers) in java
HrithikShinde
 
Abstract class
Abstract classAbstract class
Abstract class
Tony Nguyen
 
Main method in java
Main method in javaMain method in java
Main method in java
Hitesh Kumar
 
Diving in OOP (Day 1) : Polymorphism and Inheritance (Early Binding/Compile T...
Diving in OOP (Day 1) : Polymorphism and Inheritance (Early Binding/Compile T...Diving in OOP (Day 1) : Polymorphism and Inheritance (Early Binding/Compile T...
Diving in OOP (Day 1) : Polymorphism and Inheritance (Early Binding/Compile T...
Akhil Mittal
 
Collections - Lists, Sets
Collections - Lists, Sets Collections - Lists, Sets
Collections - Lists, Sets
Hitesh-Java
 
Friends function and_classes
Friends function and_classesFriends function and_classes
Friends function and_classes
asadsardar
 
Activities, Fragments, and Events
Activities, Fragments, and EventsActivities, Fragments, and Events
Activities, Fragments, and Events
Henry Osborne
 
Class template
Class templateClass template
Class template
Kousalya M
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented Programming
Iqra khalil
 
Multiple inheritance in java3 (1).pptx
Multiple inheritance in java3 (1).pptxMultiple inheritance in java3 (1).pptx
Multiple inheritance in java3 (1).pptx
RkGupta83
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
Amit Soni (CTFL)
 
Access specifiers(modifiers) in java
Access specifiers(modifiers) in javaAccess specifiers(modifiers) in java
Access specifiers(modifiers) in java
HrithikShinde
 

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

object oriented programming and methodology.pptx
object oriented programming and methodology.pptxobject 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-SPPUUNIT1- OBJECT ORIENTED PROGRAMMING IN JAVA- AIML IT-SPPU
UNIT1- OBJECT ORIENTED PROGRAMMING IN JAVA- AIML IT-SPPU
ApurvaLaddha
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
sana younas
 
Ch 1 Introduction to Object Oriented Programming.pptx
Ch 1 Introduction to Object Oriented Programming.pptxCh 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).pdfProcedural-vs-Object-Oriented-Programming (1).pdf
Procedural-vs-Object-Oriented-Programming (1).pdf
AnujMalviya12
 
Principles of OOPs.pptx
Principles of OOPs.pptxPrinciples of OOPs.pptx
Principles of OOPs.pptx
LakshyaChauhan21
 
oop.pptx
oop.pptxoop.pptx
oop.pptx
KabitaParajuli3
 
object oriented programing lecture 1
object oriented programing lecture 1object oriented programing lecture 1
object oriented programing lecture 1
Geophery sanga
 
POP vs OOP Introduction
POP vs OOP IntroductionPOP 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 helpfulObject 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 thisObject 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 conceptsIntroduction to oops concepts
Introduction to oops concepts
Nilesh Dalvi
 
IET307 OOP - object oriented programming concepts.pptx
IET307 OOP - object oriented programming concepts.pptxIET307 OOP - object oriented programming concepts.pptx
IET307 OOP - object oriented programming concepts.pptx
BasithAb2
 
2 Object Oriented Programming
2 Object Oriented Programming2 Object Oriented Programming
2 Object Oriented Programming
Praveen M Jigajinni
 
PPT_Object Oriented Programming .pptx
PPT_Object Oriented Programming     .pptxPPT_Object Oriented Programming     .pptx
PPT_Object Oriented Programming .pptx
MDFARHAN3070
 
PPT_Object Oriented Programming (2).pptx
PPT_Object Oriented Programming (2).pptxPPT_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++.pptxOBJECT ORIENTED PROGRAMMING CONCEPTS IN C++.pptx
OBJECT ORIENTED PROGRAMMING CONCEPTS IN C++.pptx
Maharshi Dayanand University Rohtak
 
CPP_,module2_1.pptx
CPP_,module2_1.pptxCPP_,module2_1.pptx
CPP_,module2_1.pptx
AbhilashTom4
 
Object oriented programming (oops) python
Object oriented programming (oops) pythonObject oriented programming (oops) python
Object oriented programming (oops) python
TayyabaIrshad6
 
Intro to oop.pptx
Intro to oop.pptxIntro to oop.pptx
Intro to oop.pptx
UmerUmer25
 
object oriented programming and methodology.pptx
object oriented programming and methodology.pptxobject 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-SPPUUNIT1- OBJECT ORIENTED PROGRAMMING IN JAVA- AIML IT-SPPU
UNIT1- OBJECT ORIENTED PROGRAMMING IN JAVA- AIML IT-SPPU
ApurvaLaddha
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
sana younas
 
Ch 1 Introduction to Object Oriented Programming.pptx
Ch 1 Introduction to Object Oriented Programming.pptxCh 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).pdfProcedural-vs-Object-Oriented-Programming (1).pdf
Procedural-vs-Object-Oriented-Programming (1).pdf
AnujMalviya12
 
object oriented programing lecture 1
object oriented programing lecture 1object oriented programing lecture 1
object oriented programing lecture 1
Geophery sanga
 
POP vs OOP Introduction
POP vs OOP IntroductionPOP 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 helpfulObject 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 thisObject 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 conceptsIntroduction to oops concepts
Introduction to oops concepts
Nilesh Dalvi
 
IET307 OOP - object oriented programming concepts.pptx
IET307 OOP - object oriented programming concepts.pptxIET307 OOP - object oriented programming concepts.pptx
IET307 OOP - object oriented programming concepts.pptx
BasithAb2
 
PPT_Object Oriented Programming .pptx
PPT_Object Oriented Programming     .pptxPPT_Object Oriented Programming     .pptx
PPT_Object Oriented Programming .pptx
MDFARHAN3070
 
PPT_Object Oriented Programming (2).pptx
PPT_Object Oriented Programming (2).pptxPPT_Object Oriented Programming (2).pptx
PPT_Object Oriented Programming (2).pptx
faizus786
 
CPP_,module2_1.pptx
CPP_,module2_1.pptxCPP_,module2_1.pptx
CPP_,module2_1.pptx
AbhilashTom4
 
Object oriented programming (oops) python
Object oriented programming (oops) pythonObject oriented programming (oops) python
Object oriented programming (oops) python
TayyabaIrshad6
 
Intro to oop.pptx
Intro to oop.pptxIntro to oop.pptx
Intro to oop.pptx
UmerUmer25
 
Ad

Recently uploaded (20)

MATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKANMATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKAN
aditya23173
 
THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...
THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...
THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...
parmarjuli1412
 
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptxDiptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Arshad Shaikh
 
Rai dyansty Chach or Brahamn dynasty, History of Dahir History of Sindh NEP.pptx
Rai dyansty Chach or Brahamn dynasty, History of Dahir History of Sindh NEP.pptxRai dyansty Chach or Brahamn dynasty, History of Dahir History of Sindh NEP.pptx
Rai dyansty Chach or Brahamn dynasty, History of Dahir History of Sindh NEP.pptx
Dr. Ravi Shankar Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
EduSkills OECD
 
Analysis of Quantitative Data Parametric and non-parametric tests.pptx
Analysis of Quantitative Data Parametric and non-parametric tests.pptxAnalysis of Quantitative Data Parametric and non-parametric tests.pptx
Analysis of Quantitative Data Parametric and non-parametric tests.pptx
Shrutidhara2
 
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition OecdEnergy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
razelitouali
 
How to Create Quotation Templates Sequence in Odoo 18 Sales
How to Create Quotation Templates Sequence in Odoo 18 SalesHow to Create Quotation Templates Sequence in Odoo 18 Sales
How to Create Quotation Templates Sequence in Odoo 18 Sales
Celine George
 
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptxSEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
PoojaSen20
 
Rose Cultivation Practices by Kushal Lamichhane.pdf
Rose Cultivation Practices by Kushal Lamichhane.pdfRose Cultivation Practices by Kushal Lamichhane.pdf
Rose Cultivation Practices by Kushal Lamichhane.pdf
kushallamichhame
 
What are the benefits that dance brings?
What are the benefits that dance brings?What are the benefits that dance brings?
What are the benefits that dance brings?
memi27
 
Respiratory System , Urinary System
Respiratory  System , Urinary SystemRespiratory  System , Urinary System
Respiratory System , Urinary System
RushiMandali
 
How to Create a Rainbow Man Effect in Odoo 18
How to Create a Rainbow Man Effect in Odoo 18How to Create a Rainbow Man Effect in Odoo 18
How to Create a Rainbow Man Effect in Odoo 18
Celine George
 
june 10 2025 ppt for madden on art science is over.pptx
june 10 2025 ppt for madden on art science is over.pptxjune 10 2025 ppt for madden on art science is over.pptx
june 10 2025 ppt for madden on art science is over.pptx
roger malina
 
Optimization technique in pharmaceutical product development.pptx
Optimization technique in pharmaceutical product development.pptxOptimization technique in pharmaceutical product development.pptx
Optimization technique in pharmaceutical product development.pptx
UrmiPrajapati3
 
MATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKANMATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKAN
aditya23173
 
Unit- 4 Biostatistics & Research Methodology.pdf
Unit- 4 Biostatistics & Research Methodology.pdfUnit- 4 Biostatistics & Research Methodology.pdf
Unit- 4 Biostatistics & Research Methodology.pdf
KRUTIKA CHANNE
 
Hemiptera & Neuroptera: Insect Diversity.pptx
Hemiptera & Neuroptera: Insect Diversity.pptxHemiptera & Neuroptera: Insect Diversity.pptx
Hemiptera & Neuroptera: Insect Diversity.pptx
Arshad Shaikh
 
LDMMIA Free Reiki Yoga S9 Grad Level Intuition II
LDMMIA Free Reiki Yoga S9 Grad Level Intuition IILDMMIA Free Reiki Yoga S9 Grad Level Intuition II
LDMMIA Free Reiki Yoga S9 Grad Level Intuition II
LDM & Mia eStudios
 
Black and White Illustrative Group Project Presentation.pdf (1).pdf
Black and White Illustrative Group Project Presentation.pdf (1).pdfBlack and White Illustrative Group Project Presentation.pdf (1).pdf
Black and White Illustrative Group Project Presentation.pdf (1).pdf
AnnasofiaUrsini
 
MATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKANMATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKAN
aditya23173
 
THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...
THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...
THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...
parmarjuli1412
 
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptxDiptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Arshad Shaikh
 
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
EduSkills OECD
 
Analysis of Quantitative Data Parametric and non-parametric tests.pptx
Analysis of Quantitative Data Parametric and non-parametric tests.pptxAnalysis of Quantitative Data Parametric and non-parametric tests.pptx
Analysis of Quantitative Data Parametric and non-parametric tests.pptx
Shrutidhara2
 
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition OecdEnergy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
razelitouali
 
How to Create Quotation Templates Sequence in Odoo 18 Sales
How to Create Quotation Templates Sequence in Odoo 18 SalesHow to Create Quotation Templates Sequence in Odoo 18 Sales
How to Create Quotation Templates Sequence in Odoo 18 Sales
Celine George
 
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptxSEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
PoojaSen20
 
Rose Cultivation Practices by Kushal Lamichhane.pdf
Rose Cultivation Practices by Kushal Lamichhane.pdfRose Cultivation Practices by Kushal Lamichhane.pdf
Rose Cultivation Practices by Kushal Lamichhane.pdf
kushallamichhame
 
What are the benefits that dance brings?
What are the benefits that dance brings?What are the benefits that dance brings?
What are the benefits that dance brings?
memi27
 
Respiratory System , Urinary System
Respiratory  System , Urinary SystemRespiratory  System , Urinary System
Respiratory System , Urinary System
RushiMandali
 
How to Create a Rainbow Man Effect in Odoo 18
How to Create a Rainbow Man Effect in Odoo 18How to Create a Rainbow Man Effect in Odoo 18
How to Create a Rainbow Man Effect in Odoo 18
Celine George
 
june 10 2025 ppt for madden on art science is over.pptx
june 10 2025 ppt for madden on art science is over.pptxjune 10 2025 ppt for madden on art science is over.pptx
june 10 2025 ppt for madden on art science is over.pptx
roger malina
 
Optimization technique in pharmaceutical product development.pptx
Optimization technique in pharmaceutical product development.pptxOptimization technique in pharmaceutical product development.pptx
Optimization technique in pharmaceutical product development.pptx
UrmiPrajapati3
 
MATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKANMATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKAN
aditya23173
 
Unit- 4 Biostatistics & Research Methodology.pdf
Unit- 4 Biostatistics & Research Methodology.pdfUnit- 4 Biostatistics & Research Methodology.pdf
Unit- 4 Biostatistics & Research Methodology.pdf
KRUTIKA CHANNE
 
Hemiptera & Neuroptera: Insect Diversity.pptx
Hemiptera & Neuroptera: Insect Diversity.pptxHemiptera & Neuroptera: Insect Diversity.pptx
Hemiptera & Neuroptera: Insect Diversity.pptx
Arshad Shaikh
 
LDMMIA Free Reiki Yoga S9 Grad Level Intuition II
LDMMIA Free Reiki Yoga S9 Grad Level Intuition IILDMMIA Free Reiki Yoga S9 Grad Level Intuition II
LDMMIA Free Reiki Yoga S9 Grad Level Intuition II
LDM & Mia eStudios
 
Black and White Illustrative Group Project Presentation.pdf (1).pdf
Black and White Illustrative Group Project Presentation.pdf (1).pdfBlack and White Illustrative Group Project Presentation.pdf (1).pdf
Black and White Illustrative Group Project Presentation.pdf (1).pdf
AnnasofiaUrsini
 
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