SlideShare a Scribd company logo
2
Most read
3
Most read
4
Most read
Object oriented programming
What is
Object-Oriented Programming
 Any Idea ????
Definition
 Object-oriented programming (OOP) is a
programming paradigm using "objects" – data
structures consisting of data fields and methods
together with their interactions – to design
applications and computer programs. Programming
techniques may include features such as data
abstraction, encapsulation, messaging, modularity,
polymorphism, and inheritance
4 Pillars of OOPS
 Abstraction
 Polymorphism
 Inheritance
 Encapsulation
Abstraction
 Abstraction (from the Latin abs, meaning away from
and traction meaning to draw) is the process of taking
away or removing characteristics from something in
order to reduce it to a set of essential characteristics. In
object-oriented programming, abstraction is one of
three central principles (along with encapsulation and
inheritance). Through the process of abstraction, a
programmer hides all but the relevant data about an
object in order to reduce complexity and increase
efficiency. In the same way that abstractionomitted
Polymorphism
 polymorphism refers to a programming language's
ability to process objects differently depending on
their data type or class. More specifically, it is the
ability to redefine methods for derived classes. For
example, given a base class shape, polymorphism
enables the programmer to define different area
methods for any number of derived classes, such as
circles, rectangles and triangles. No matter what shape
an object is, applying the area method to it will return
the correct results. Polymorphism is considered to be a
requirement of any true object-oriented programming
language (OOPL).
Inheritance
 In object-oriented programming (OOP), inheritance
is a way to compartmentalize and reuse code by
creating collections of attributes and behaviors called
objects that can be based on previously created
objects. In classical inheritance where objects are
defined by classes, classes can inherit other classes.
The new classes, known as subclasses (or derived
classes), inherit attributes and behavior (i.e. previously
coded algorithms) of the pre-existing classes, which
are referred to as superclasses, ancestor classes or base
classes. The inheritance relationships of classes gives
rise to a hierarchy
Encapsulation
 Encapsulation means as much as shielding. Each
object-oriented object has a shield around it. Objects
can't 'see' each other. They can exchange things
though, as if they are interconnected through a hatch.
 shows the concept of the encapsulation. It separates
the external aspects of an object from the internal
implementation details of the object, which are
hidden from other objects. The object encapsulates
both data and the logical procedures required to
manipulate the data.
Encapsulation Example:
Classes
 In object-oriented programming, a class is a construct
that is used as a blueprint to create instances of itself –
referred to as class instances, class objects, instance
objects or simply objects. A class defines constituent
members which enable these class instances to have
state and behavior. Data field members (member
variables or instance variables) enable a class object to
maintain state. Other kinds of members, especially
methods, enable a class object's behavior
Class In Java
 Classes are the fundamental building blocks of a Java
program. You can define an Employee class as follows:
 class Employee {
int age;
double salary;
}
 By convention, class names capitalize the initial of
each word.
 For example: Employee, Boss, DateUtility, PostOffice,
RegularRateCalculator.
Continued
 This type of naming convention is known as Pascal
naming convention.
 The other convention, the camel naming convention,
capitalize the initial of each word, except the first
word.
 Method and field names use the camel naming
convention
Object
 An object doesn't exist until an instance of the class
has been created; the class is just a definition. When
the object is physically created, space for that object is
allocated in RAM. It is possible to have multiple
objects created from one class.
Access Control
In Java there are 4 types of access types
 1. Private .
 2. public .
 3. default (no type )
 4. protected .
◆ = CAN ACCESS ◇ = NO Access

More Related Content

PPTX
Concept of OOPS with real life examples
PPTX
concept of oops
PPTX
Introduction to oop
PPT
Object Oriented Programming Concepts
PPTX
Need of object oriented programming
PPT
Basic concepts of object oriented programming
PPTX
Object Oriented programming - Introduction
PPTX
Characteristics of OOPS
Concept of OOPS with real life examples
concept of oops
Introduction to oop
Object Oriented Programming Concepts
Need of object oriented programming
Basic concepts of object oriented programming
Object Oriented programming - Introduction
Characteristics of OOPS

What's hot (20)

PDF
Oops concepts || Object Oriented Programming Concepts in Java
PPT
friend function(c++)
PPTX
OOPS In JAVA.pptx
PPTX
classes and objects in C++
PPT
Object-oriented concepts
PPTX
Inheritance in c++
PPTX
Object Oriented Programming Using C++
PDF
Methods in Java
PPTX
Static Data Members and Member Functions
PPTX
Principles and advantages of oop ppt
PPTX
Interface in java
PPT
C by balaguruswami - e.balagurusamy
PPT
Abstract class in java
PDF
Object oriented programming c++
PPT
Class and object in C++
PPT
Java interfaces
PPTX
Constructor in java
PPTX
OOP Introduction with java programming language
PPTX
Inheritance in JAVA PPT
PPTX
Introduction to Object Oriented Programming
Oops concepts || Object Oriented Programming Concepts in Java
friend function(c++)
OOPS In JAVA.pptx
classes and objects in C++
Object-oriented concepts
Inheritance in c++
Object Oriented Programming Using C++
Methods in Java
Static Data Members and Member Functions
Principles and advantages of oop ppt
Interface in java
C by balaguruswami - e.balagurusamy
Abstract class in java
Object oriented programming c++
Class and object in C++
Java interfaces
Constructor in java
OOP Introduction with java programming language
Inheritance in JAVA PPT
Introduction to Object Oriented Programming
Ad

Similar to Object oriented programming (20)

PPTX
OOP Lesson 2.pptx
PPTX
bbbnnjxhxshjsjskshsjsjshssddhjddjdjddhgd
PPTX
object oriented programing lecture 1
PDF
L1-Introduction to OOPs concepts.pdf
PDF
ITFT - Oops
PPTX
Object oriented programming concepts
PPTX
Object oriented programming concepts
PPTX
OOP Presentation.pptx
PPTX
OOP Presentation.pptx
PDF
Oops concepts
PPTX
Object Oriented Programming fundamentals.pptx
PPTX
Object Oriented Programming Language is an oop
PPTX
PPTX
Introduction to Object Oriented Programming
PPTX
Object Oriented Programming Concepts Using C++
PPTX
oop.pptx
PPTX
4-OOPS.pptx
PPTX
Intro to object oriented programming.pptx
PPTX
PPT_Object Oriented Programming .pptx
PPTX
PPT_Object Oriented Programming (2).pptx
OOP Lesson 2.pptx
bbbnnjxhxshjsjskshsjsjshssddhjddjdjddhgd
object oriented programing lecture 1
L1-Introduction to OOPs concepts.pdf
ITFT - Oops
Object oriented programming concepts
Object oriented programming concepts
OOP Presentation.pptx
OOP Presentation.pptx
Oops concepts
Object Oriented Programming fundamentals.pptx
Object Oriented Programming Language is an oop
Introduction to Object Oriented Programming
Object Oriented Programming Concepts Using C++
oop.pptx
4-OOPS.pptx
Intro to object oriented programming.pptx
PPT_Object Oriented Programming .pptx
PPT_Object Oriented Programming (2).pptx
Ad

Recently uploaded (20)

PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Big Data Technologies - Introduction.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Electronic commerce courselecture one. Pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPT
Teaching material agriculture food technology
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Machine Learning_overview_presentation.pptx
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
“AI and Expert System Decision Support & Business Intelligence Systems”
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Big Data Technologies - Introduction.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Electronic commerce courselecture one. Pdf
MIND Revenue Release Quarter 2 2025 Press Release
Advanced methodologies resolving dimensionality complications for autism neur...
Encapsulation_ Review paper, used for researhc scholars
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Spectral efficient network and resource selection model in 5G networks
NewMind AI Weekly Chronicles - August'25-Week II
Assigned Numbers - 2025 - Bluetooth® Document
Teaching material agriculture food technology
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Machine Learning_overview_presentation.pptx
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Chapter 3 Spatial Domain Image Processing.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025

Object oriented programming

  • 3. Definition  Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their interactions – to design applications and computer programs. Programming techniques may include features such as data abstraction, encapsulation, messaging, modularity, polymorphism, and inheritance
  • 4. 4 Pillars of OOPS  Abstraction  Polymorphism  Inheritance  Encapsulation
  • 5. Abstraction  Abstraction (from the Latin abs, meaning away from and traction meaning to draw) is the process of taking away or removing characteristics from something in order to reduce it to a set of essential characteristics. In object-oriented programming, abstraction is one of three central principles (along with encapsulation and inheritance). Through the process of abstraction, a programmer hides all but the relevant data about an object in order to reduce complexity and increase efficiency. In the same way that abstractionomitted
  • 6. Polymorphism  polymorphism refers to a programming language's ability to process objects differently depending on their data type or class. More specifically, it is the ability to redefine methods for derived classes. For example, given a base class shape, polymorphism enables the programmer to define different area methods for any number of derived classes, such as circles, rectangles and triangles. No matter what shape an object is, applying the area method to it will return the correct results. Polymorphism is considered to be a requirement of any true object-oriented programming language (OOPL).
  • 7. Inheritance  In object-oriented programming (OOP), inheritance is a way to compartmentalize and reuse code by creating collections of attributes and behaviors called objects that can be based on previously created objects. In classical inheritance where objects are defined by classes, classes can inherit other classes. The new classes, known as subclasses (or derived classes), inherit attributes and behavior (i.e. previously coded algorithms) of the pre-existing classes, which are referred to as superclasses, ancestor classes or base classes. The inheritance relationships of classes gives rise to a hierarchy
  • 8. Encapsulation  Encapsulation means as much as shielding. Each object-oriented object has a shield around it. Objects can't 'see' each other. They can exchange things though, as if they are interconnected through a hatch.  shows the concept of the encapsulation. It separates the external aspects of an object from the internal implementation details of the object, which are hidden from other objects. The object encapsulates both data and the logical procedures required to manipulate the data.
  • 10. Classes  In object-oriented programming, a class is a construct that is used as a blueprint to create instances of itself – referred to as class instances, class objects, instance objects or simply objects. A class defines constituent members which enable these class instances to have state and behavior. Data field members (member variables or instance variables) enable a class object to maintain state. Other kinds of members, especially methods, enable a class object's behavior
  • 11. Class In Java  Classes are the fundamental building blocks of a Java program. You can define an Employee class as follows:  class Employee { int age; double salary; }  By convention, class names capitalize the initial of each word.  For example: Employee, Boss, DateUtility, PostOffice, RegularRateCalculator.
  • 12. Continued  This type of naming convention is known as Pascal naming convention.  The other convention, the camel naming convention, capitalize the initial of each word, except the first word.  Method and field names use the camel naming convention
  • 13. Object  An object doesn't exist until an instance of the class has been created; the class is just a definition. When the object is physically created, space for that object is allocated in RAM. It is possible to have multiple objects created from one class.
  • 14. Access Control In Java there are 4 types of access types  1. Private .  2. public .  3. default (no type )  4. protected .
  • 15. ◆ = CAN ACCESS ◇ = NO Access