SlideShare a Scribd company logo
OOPS CONCEPTS
Introduction
• Object oriented programming is a paradigm that provides many concepts such
as inheritance, polymorphism, abstraction, encapsulation.
• Simula is considered as the first object-oriented programming language
• The main aim of oops is to bind together the data and the functions that
operate on them so that no other part of the code can access this data except
that functions.
OOPS Concepts are
• Class
• Object
• Method and method passing
• Pillars of OOPs
• Abstraction
• Encapsulation
• Inheritance
• polymorphism
CLASS
• A class is a user defined blueprint or prototype from which objects are
created.
• It represents the set of properties or methods that are common to all objects of
one type.
• In general class declarations can include these components, in order
• Modifier
• Class name
• Body
OBJECT
• Object is a basic unit of object oriented programming and represents the real
life entities
• A typical java program creates many objects, which as you know, interact by
invoking methods.
• An object consist of
• State
• Behaviour
• Identity
• method
PILLARS OF OOP’s
• ABSTRACTION
• ENCAPSULATION
• POLYMORPHISM
• INHERITANCE
ABSTRACTION
• Data abstraction is the property by virtue of which only the essential details
are displayed to the user.
• Data abstraction may also be defined as the process of identifying only the
required characteristics of an object ignoring the irrelevant details.
• The properties and behaviours of an object differentiate it from other object
of similar type and also help in classifying/grouping objects.
• In java, abstraction is achieved by interfaces and abstract class, we can
achieve 100% abstraction using interfaces.
ENCAPSULATION
• It is defined as the wrapping up of data under a single unit
• It is the mechanism that binds together code and the data it manipulates
• It is a protective shield that prevents the data from being accessed by the code
outside this shield
• As in encapsulation, the data in a class is hidden from other classes, so it is
also known as data hiding.
• Encapsulation can be achieved by declaring all the variable in the class as
private and writing public methods in the class to set and get the values of
variables.
POLYMORPHISM
• The word polymorphism means having many forms
• In simple words, we can define polymorphism as the ability of a message to
be displayed in more than one form.
• Polymorphism allows us to perform a single action in different ways, in other
words, polymorphism allows you to define one interface and have multiple
implementations.
• The word “poly” means many and “morph” means forms, so it means many
forms
TYPES OF POLYMORPHISM
• In java polymorphism is mainly divided into two types.
• Compile-time polymorphism
• Run-time polymorphism
Compile-time polymorphism
• It is also known as static polymorphism.
• This type of polymorphism is a achieved by function overloading or
operator overloading
(java doesn’t support the operator overloading)
Method overloading: when there are multiple functions with the same name
but different parameters then these functions are said to be overloaded
Functions can be overloaded by change in the number of arguments
or/and a change in the type of arguments
Run-time polymorphism
• It is also known as Dynamic method dispatch
• It is a process in which a function call to the overridden method is resolved at
runtime
• This type of polymorphism is achieved by method overriding
Method overriding: on the other hand, occurs when a derived class has a
definition for one of the member functions of the base class, the base function is
said to be overridden.
INHERITANCE
• Inheritance in java is “ a mechanism in which one object acquire all the
properties and behaviours of a parent class object “
• It is an important part of oops
• The idea behind inheritance in java is that you can create new classes that are built
upon existing classes
• When you inherit from an existing class, you can reuse methods and fields of
parent class
• Inheritance represents the IS-A Relationship which is also known as a parent-child
relationship
USES OF INHERITANCE
• For method overriding
• For code reusability
TERMS USED IN INHERITANCE
• CLASS: A class is a group of objects which have common properties
it is a template or blueprint from which objects are created
• SUB CLASS/CHILD CLASS: Subclass is a class which inherits the other
class
it is also called derived class, extend class
• SUPER CLASS/ PARENT CLASS : Super class is the class from where a
subclass inherits the features.
it is also called a base class or a parent classs.
SYNTAX
Class Subclass_name extends Superclass_name
{
//Method and Fields
}
The extend keyword indicates that you are making a new class
that derives from an existing class.
TYPES OF INHERITANCE
• On the basis of class there can be three types of inheritance in java. Single,
Multilevel and Hierarchical.
• In java programming, multiple and hybrid inheritance is supported through
interface only.
• When one class inherits multiple classes it is known as multiple inheritance.
• SINGLE INHERITANCE: When a class inherits another class, it is known as
a single inheritance
• MULTILEVEL INHERITANCE: When there is a chain of inheritance it is
known as multilevel inheritance
• HIERARCHICAL INHERITANCE: When two or more classes inherits a
single class it is known as hierarchical inheritance
WHY MULTIPLE INHERITANCE IS NOT
SUPPORTED IN JAVA?
• To reduce the complexity and simplify the language, multiple inheritance is
not supported in java
• Consider, a scenario where A,B and C are three classes. The C class inherits A
and B classes
• If A and B classes have the same method and you call it from child class
object, there will be ambiguity to call the method of A or B class
• Since compile-time errors are better than runtime errors.
THANKING YOU
BY
HARIKUMAR M

More Related Content

Similar to OOPS (Object Oriented Programming System) CONCEPTS (20)

PPTX
Object Oriented Programming.pptx
ShuvrojitMajumder
 
DOCX
Java oop concepts
Syeful Islam
 
PDF
JAVA-PPT'S.pdf
AnmolVerma363503
 
PPTX
Basics of oops concept
DINESH KUMAR ARIVARASAN
 
PPTX
Java OOPS Concept
Richa Gupta
 
PPSX
Oop features java presentationshow
ilias ahmed
 
PPTX
oops concept in java | object oriented programming in java
CPD INDIA
 
PPT
Java OOP s concepts and buzzwords
Raja Sekhar
 
PPTX
Introduction to OOPs second year cse.pptx
solemanhldr
 
PPTX
JAVA-PPT'S-complete-chrome.pptx
KunalYadav65140
 
PPTX
JAVA-PPT'S.pptx
RaazIndia
 
PPTX
UNIT I OOP AND JAVA FUNDAMENTALS CONSTRUCTOR
mohanrajm63
 
PPT
Chapter 5 (OOP Principles).ppt
henokmetaferia1
 
PDF
Introducing java oop concepts
Ivelin Yanev
 
PPTX
object oriented programming unit two ppt
isiagnel2
 
PPTX
Android Training (Java Review)
Khaled Anaqwa
 
PDF
Java Progamming Paradigms, OOPS Concept, Introduction to Java, Structure of J...
Sakthi Durai
 
PDF
Java Programming Paradigms Chapter 1
Sakthi Durai
 
PPTX
Introduction to oop and java fundamentals
AnsgarMary
 
PPT
L7 inheritance
teach4uin
 
Object Oriented Programming.pptx
ShuvrojitMajumder
 
Java oop concepts
Syeful Islam
 
JAVA-PPT'S.pdf
AnmolVerma363503
 
Basics of oops concept
DINESH KUMAR ARIVARASAN
 
Java OOPS Concept
Richa Gupta
 
Oop features java presentationshow
ilias ahmed
 
oops concept in java | object oriented programming in java
CPD INDIA
 
Java OOP s concepts and buzzwords
Raja Sekhar
 
Introduction to OOPs second year cse.pptx
solemanhldr
 
JAVA-PPT'S-complete-chrome.pptx
KunalYadav65140
 
JAVA-PPT'S.pptx
RaazIndia
 
UNIT I OOP AND JAVA FUNDAMENTALS CONSTRUCTOR
mohanrajm63
 
Chapter 5 (OOP Principles).ppt
henokmetaferia1
 
Introducing java oop concepts
Ivelin Yanev
 
object oriented programming unit two ppt
isiagnel2
 
Android Training (Java Review)
Khaled Anaqwa
 
Java Progamming Paradigms, OOPS Concept, Introduction to Java, Structure of J...
Sakthi Durai
 
Java Programming Paradigms Chapter 1
Sakthi Durai
 
Introduction to oop and java fundamentals
AnsgarMary
 
L7 inheritance
teach4uin
 

Recently uploaded (20)

PDF
Efficient, Automated Claims Processing Software for Insurers
Insurance Tech Services
 
PDF
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
PPTX
Transforming Mining & Engineering Operations with Odoo ERP | Streamline Proje...
SatishKumar2651
 
PDF
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
PPTX
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Shane Coughlan
 
PDF
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
PPTX
Human Resources Information System (HRIS)
Amity University, Patna
 
DOCX
Import Data Form Excel to Tally Services
Tally xperts
 
PDF
GetOnCRM Speeds Up Agentforce 3 Deployment for Enterprise AI Wins.pdf
GetOnCRM Solutions
 
PDF
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PPTX
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
PPTX
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PPTX
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
 
PPTX
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
PDF
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
PPTX
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
PDF
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Safe Software
 
PDF
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
PDF
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
Efficient, Automated Claims Processing Software for Insurers
Insurance Tech Services
 
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
Transforming Mining & Engineering Operations with Odoo ERP | Streamline Proje...
SatishKumar2651
 
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Shane Coughlan
 
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
Human Resources Information System (HRIS)
Amity University, Patna
 
Import Data Form Excel to Tally Services
Tally xperts
 
GetOnCRM Speeds Up Agentforce 3 Deployment for Enterprise AI Wins.pdf
GetOnCRM Solutions
 
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
 
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Safe Software
 
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
Ad

OOPS (Object Oriented Programming System) CONCEPTS

  • 2. Introduction • Object oriented programming is a paradigm that provides many concepts such as inheritance, polymorphism, abstraction, encapsulation. • Simula is considered as the first object-oriented programming language • The main aim of oops is to bind together the data and the functions that operate on them so that no other part of the code can access this data except that functions.
  • 3. OOPS Concepts are • Class • Object • Method and method passing • Pillars of OOPs • Abstraction • Encapsulation • Inheritance • polymorphism
  • 4. CLASS • A class is a user defined blueprint or prototype from which objects are created. • It represents the set of properties or methods that are common to all objects of one type. • In general class declarations can include these components, in order • Modifier • Class name • Body
  • 5. OBJECT • Object is a basic unit of object oriented programming and represents the real life entities • A typical java program creates many objects, which as you know, interact by invoking methods. • An object consist of • State • Behaviour • Identity • method
  • 6. PILLARS OF OOP’s • ABSTRACTION • ENCAPSULATION • POLYMORPHISM • INHERITANCE
  • 7. ABSTRACTION • Data abstraction is the property by virtue of which only the essential details are displayed to the user. • Data abstraction may also be defined as the process of identifying only the required characteristics of an object ignoring the irrelevant details. • The properties and behaviours of an object differentiate it from other object of similar type and also help in classifying/grouping objects. • In java, abstraction is achieved by interfaces and abstract class, we can achieve 100% abstraction using interfaces.
  • 8. ENCAPSULATION • It is defined as the wrapping up of data under a single unit • It is the mechanism that binds together code and the data it manipulates • It is a protective shield that prevents the data from being accessed by the code outside this shield • As in encapsulation, the data in a class is hidden from other classes, so it is also known as data hiding. • Encapsulation can be achieved by declaring all the variable in the class as private and writing public methods in the class to set and get the values of variables.
  • 9. POLYMORPHISM • The word polymorphism means having many forms • In simple words, we can define polymorphism as the ability of a message to be displayed in more than one form. • Polymorphism allows us to perform a single action in different ways, in other words, polymorphism allows you to define one interface and have multiple implementations. • The word “poly” means many and “morph” means forms, so it means many forms
  • 10. TYPES OF POLYMORPHISM • In java polymorphism is mainly divided into two types. • Compile-time polymorphism • Run-time polymorphism
  • 11. Compile-time polymorphism • It is also known as static polymorphism. • This type of polymorphism is a achieved by function overloading or operator overloading (java doesn’t support the operator overloading) Method overloading: when there are multiple functions with the same name but different parameters then these functions are said to be overloaded Functions can be overloaded by change in the number of arguments or/and a change in the type of arguments
  • 12. Run-time polymorphism • It is also known as Dynamic method dispatch • It is a process in which a function call to the overridden method is resolved at runtime • This type of polymorphism is achieved by method overriding Method overriding: on the other hand, occurs when a derived class has a definition for one of the member functions of the base class, the base function is said to be overridden.
  • 13. INHERITANCE • Inheritance in java is “ a mechanism in which one object acquire all the properties and behaviours of a parent class object “ • It is an important part of oops • The idea behind inheritance in java is that you can create new classes that are built upon existing classes • When you inherit from an existing class, you can reuse methods and fields of parent class • Inheritance represents the IS-A Relationship which is also known as a parent-child relationship
  • 14. USES OF INHERITANCE • For method overriding • For code reusability
  • 15. TERMS USED IN INHERITANCE • CLASS: A class is a group of objects which have common properties it is a template or blueprint from which objects are created • SUB CLASS/CHILD CLASS: Subclass is a class which inherits the other class it is also called derived class, extend class • SUPER CLASS/ PARENT CLASS : Super class is the class from where a subclass inherits the features. it is also called a base class or a parent classs.
  • 16. SYNTAX Class Subclass_name extends Superclass_name { //Method and Fields } The extend keyword indicates that you are making a new class that derives from an existing class.
  • 17. TYPES OF INHERITANCE • On the basis of class there can be three types of inheritance in java. Single, Multilevel and Hierarchical. • In java programming, multiple and hybrid inheritance is supported through interface only. • When one class inherits multiple classes it is known as multiple inheritance.
  • 18. • SINGLE INHERITANCE: When a class inherits another class, it is known as a single inheritance • MULTILEVEL INHERITANCE: When there is a chain of inheritance it is known as multilevel inheritance • HIERARCHICAL INHERITANCE: When two or more classes inherits a single class it is known as hierarchical inheritance
  • 19. WHY MULTIPLE INHERITANCE IS NOT SUPPORTED IN JAVA? • To reduce the complexity and simplify the language, multiple inheritance is not supported in java • Consider, a scenario where A,B and C are three classes. The C class inherits A and B classes • If A and B classes have the same method and you call it from child class object, there will be ambiguity to call the method of A or B class • Since compile-time errors are better than runtime errors.