SlideShare a Scribd company logo
2
Most read
3
Most read
12
Most read
Md. Al-Imran
Lecturer
Department of Computer Science & Engineering
Dhaka International University
Bangladesh

 Define OOP
 OOP Vs. Structured Programming
 Main principle of OOP
 Encapsulation
 Abstraction
 Inheritance
 Polymorphism
 Overview
Contents
 Object-oriented programming is a method of
implementation in which programs are organized as
cooperative collections of objects, each of which
represents an instance of some class, and whose classes
are all members of one or more hierarchy of classes united
via inheritance relationships.
What is OOP ?

Structure Programming Object Oriented Programming
Top to Bottom Design Object focused design
Structure determines execution flow Conversion determines execution flow.
Moderately complex program Very Complex Program
Less data security More security
Less flexible More flexible
Less reusability More reusability
Less abstraction More abstraction
Structure Programming Vs. OOP

Reusability
Platform Independent
Security
Client/Sever Application
Graphical User Interface
Design Pattern
Portability (WORA)
Why Java?

 Write Ones Run Anywhere
WORA

 Fundamental Principles of Object Oriented Programming:
1. Encapsulation.
2. Abstraction.
3. Inheritance.
4. Polymorphism.
Main principle of OOP

 Encapsulation is the mechanism that binds together
code and the data it manipulates, and keeps both
safe from outside interference and misuse.
Encapsulation

i. Protection
ii. Consistency
iii. Allows change
Advantages of Encapsulation
 abstraction is a process of hiding the implementation
details from the user, only the functionality will be
provided to the user. In other words, the user will have the
information on what the object does instead of how it
does.
 In Java, abstraction is achieved using Abstract classes and
interfaces.
Abstraction

 An abstract class is a class that is declared with abstract keyword.
 An abstract method is a method that is declared without an
implementation.
 An abstract class may or may not have all abstract methods. Some
of them can be concrete methods.
 A method defined abstract must always be redefined in the subclass,
 Any class that contains one or more abstract methods must also be
declared with abstract keyword.
 There can be no object of an abstract class. That is, an abstract class
can not be directly instantiated with the new operator.
Abstract Class Vs. Abstract
Method

 Inheritance is the process by which one object acquires the properties
of another object.
 A class that is derived from another class is called a subclass(also a
derived class, extended class, or child class).
 The class from which the subclass is derived is called a super class
(also a base class or a parent class).
Inheritance

 The sub-class inherits the base class’ data members and member
functions.
 A sub-class has all data members of its base-class plus its own.
 A sub-class has all member functions of its base class (with changes)
plus its own.
Cont’d

Inheritance has a lot of benefits
 Extensibility
 Reusability
 Provides abstraction
 Eliminates redundant code
 Use inheritance for building a relationships
E.g. dog is--a animal (dogs are kind of animals)
Benefits of Inheritance
 Polymorphisms comes from Greek word that means 'many forms'.
 More precisely Polymorphisms means the ability to request that
the same methods be performed by a wide range of different types
of things.
Polymorphism

 It is achieved by using many different techniques named
method overloading and method overriding.
Cont’d

 Discuss about OOP.
 Differentiate Structure Programming and OOP.
 Main principles of OOP.
 Encapsulation.
 Abstraction.
 Inheritance.
 Polymorphism.
Overview
OOP Introduction with java programming language

More Related Content

PPTX
OOPS In JAVA.pptx
Sachin33417
 
PPTX
Basic Concepts of OOPs (Object Oriented Programming in Java)
Michelle Anne Meralpis
 
PDF
Oops concepts || Object Oriented Programming Concepts in Java
Madishetty Prathibha
 
PPT
Object Oriented Programming Concepts
thinkphp
 
PPTX
oops concept in java | object oriented programming in java
CPD INDIA
 
PPT
Object-oriented concepts
BG Java EE Course
 
PPTX
object oriented Programming ppt
Nitesh Dubey
 
PDF
Java Basic Oops Concept
atozknowledge .com
 
OOPS In JAVA.pptx
Sachin33417
 
Basic Concepts of OOPs (Object Oriented Programming in Java)
Michelle Anne Meralpis
 
Oops concepts || Object Oriented Programming Concepts in Java
Madishetty Prathibha
 
Object Oriented Programming Concepts
thinkphp
 
oops concept in java | object oriented programming in java
CPD INDIA
 
Object-oriented concepts
BG Java EE Course
 
object oriented Programming ppt
Nitesh Dubey
 
Java Basic Oops Concept
atozknowledge .com
 

What's hot (20)

PPTX
Classes, objects in JAVA
Abhilash Nair
 
ODP
OOP java
xball977
 
PPT
Java tutorial PPT
Intelligo Technologies
 
PDF
Class and Objects in Java
Spotle.ai
 
PPTX
Object Oriented Programming
Iqra khalil
 
PDF
Arrays in Java
Naz Abdalla
 
PPTX
Basics of JAVA programming
Elizabeth Thomas
 
PDF
Introduction to Java Programming
Ravi Kant Sahu
 
PPTX
Interface in java
PhD Research Scholar
 
PPTX
Control structures in java
VINOTH R
 
PPTX
Inheritance in java
Tech_MX
 
PPTX
History of java'
deepthisujithra
 
PPTX
Object Oriented Programming Concepts for beginners
Vibhawa Nirmal
 
PDF
Methods in Java
Jussi Pohjolainen
 
PDF
Java threads
Prabhakaran V M
 
PPTX
Applets in java
Wani Zahoor
 
PDF
Constants, Variables and Data Types in Java
Abhilash Nair
 
PPTX
Java abstract class & abstract methods
Shubham Dwivedi
 
PPTX
Introduction to php
Taha Malampatti
 
PPTX
Presentation on-exception-handling
Nahian Ahmed
 
Classes, objects in JAVA
Abhilash Nair
 
OOP java
xball977
 
Java tutorial PPT
Intelligo Technologies
 
Class and Objects in Java
Spotle.ai
 
Object Oriented Programming
Iqra khalil
 
Arrays in Java
Naz Abdalla
 
Basics of JAVA programming
Elizabeth Thomas
 
Introduction to Java Programming
Ravi Kant Sahu
 
Interface in java
PhD Research Scholar
 
Control structures in java
VINOTH R
 
Inheritance in java
Tech_MX
 
History of java'
deepthisujithra
 
Object Oriented Programming Concepts for beginners
Vibhawa Nirmal
 
Methods in Java
Jussi Pohjolainen
 
Java threads
Prabhakaran V M
 
Applets in java
Wani Zahoor
 
Constants, Variables and Data Types in Java
Abhilash Nair
 
Java abstract class & abstract methods
Shubham Dwivedi
 
Introduction to php
Taha Malampatti
 
Presentation on-exception-handling
Nahian Ahmed
 
Ad

Similar to OOP Introduction with java programming language (20)

ODP
Ayush oops
Ayush Pandey
 
PDF
Object-Oriented Programming (OOP)
Ahmad karawash
 
PDF
Procedural-vs-Object-Oriented-Programming (1).pdf
AnujMalviya12
 
PPTX
Object oriented programming
MH Abid
 
PPTX
object oriented programming and methodology.pptx
ayush626953
 
PPTX
SKILLWISE - OOPS CONCEPT
Skillwise Group
 
PPTX
introduction of Object oriented programming
RiturajJain8
 
PPTX
OOP Presentation.pptx
DurgaPrasadVasantati
 
PPTX
OOP Presentation.pptx
DurgaPrasadVasantati
 
PDF
L1-Introduction to OOPs concepts.pdf
BhanuJatinSingh
 
PPTX
Basic Concepts Of OOPS/OOPS in Java,C++
Guneesh Basundhra
 
PPTX
Object Oriented Programming Concepts
Abhigyan Singh Yadav
 
PPTX
Introduction to Java -unit-1
RubaNagarajan
 
PPTX
Object oriented programming
Saiful Islam Sany
 
PPTX
Intro to object oriented programming.pptx
RafiaZafar19
 
PPTX
Concepts of oop1
SheetalPareek
 
PDF
Total oop in c# dot net
Muhammad Naveed
 
PPTX
Chapter 04 object oriented programming
Praveen M Jigajinni
 
PPTX
General oops concepts
nidhiyagnik123
 
PPTX
oop.pptx
KabitaParajuli3
 
Ayush oops
Ayush Pandey
 
Object-Oriented Programming (OOP)
Ahmad karawash
 
Procedural-vs-Object-Oriented-Programming (1).pdf
AnujMalviya12
 
Object oriented programming
MH Abid
 
object oriented programming and methodology.pptx
ayush626953
 
SKILLWISE - OOPS CONCEPT
Skillwise Group
 
introduction of Object oriented programming
RiturajJain8
 
OOP Presentation.pptx
DurgaPrasadVasantati
 
OOP Presentation.pptx
DurgaPrasadVasantati
 
L1-Introduction to OOPs concepts.pdf
BhanuJatinSingh
 
Basic Concepts Of OOPS/OOPS in Java,C++
Guneesh Basundhra
 
Object Oriented Programming Concepts
Abhigyan Singh Yadav
 
Introduction to Java -unit-1
RubaNagarajan
 
Object oriented programming
Saiful Islam Sany
 
Intro to object oriented programming.pptx
RafiaZafar19
 
Concepts of oop1
SheetalPareek
 
Total oop in c# dot net
Muhammad Naveed
 
Chapter 04 object oriented programming
Praveen M Jigajinni
 
General oops concepts
nidhiyagnik123
 
oop.pptx
KabitaParajuli3
 
Ad

Recently uploaded (20)

PPTX
An introduction to Dialogue writing.pptx
drsiddhantnagine
 
PDF
Antianginal agents, Definition, Classification, MOA.pdf
Prerana Jadhav
 
PDF
UTS Health Student Promotional Representative_Position Description.pdf
Faculty of Health, University of Technology Sydney
 
PPTX
Kanban Cards _ Mass Action in Odoo 18.2 - Odoo Slides
Celine George
 
PPTX
Python-Application-in-Drug-Design by R D Jawarkar.pptx
Rahul Jawarkar
 
PPTX
PPTs-The Rise of Empiresghhhhhhhh (1).pptx
academysrusti114
 
PPTX
How to Close Subscription in Odoo 18 - Odoo Slides
Celine George
 
PPTX
HISTORY COLLECTION FOR PSYCHIATRIC PATIENTS.pptx
PoojaSen20
 
PDF
The-Invisible-Living-World-Beyond-Our-Naked-Eye chapter 2.pdf/8th science cur...
Sandeep Swamy
 
PDF
Study Material and notes for Women Empowerment
ComputerScienceSACWC
 
PPTX
Five Point Someone – Chetan Bhagat | Book Summary & Analysis by Bhupesh Kushwaha
Bhupesh Kushwaha
 
PPTX
Tips Management in Odoo 18 POS - Odoo Slides
Celine George
 
PPTX
CARE OF UNCONSCIOUS PATIENTS .pptx
AneetaSharma15
 
PDF
The Minister of Tourism, Culture and Creative Arts, Abla Dzifa Gomashie has e...
nservice241
 
DOCX
Unit 5: Speech-language and swallowing disorders
JELLA VISHNU DURGA PRASAD
 
PPTX
FSSAI (Food Safety and Standards Authority of India) & FDA (Food and Drug Adm...
Dr. Paindla Jyothirmai
 
PPT
Python Programming Unit II Control Statements.ppt
CUO VEERANAN VEERANAN
 
PPTX
Odoo 18 Sales_ Managing Quotation Validity
Celine George
 
PPTX
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
PDF
Sunset Boulevard Student Revision Booklet
jpinnuck
 
An introduction to Dialogue writing.pptx
drsiddhantnagine
 
Antianginal agents, Definition, Classification, MOA.pdf
Prerana Jadhav
 
UTS Health Student Promotional Representative_Position Description.pdf
Faculty of Health, University of Technology Sydney
 
Kanban Cards _ Mass Action in Odoo 18.2 - Odoo Slides
Celine George
 
Python-Application-in-Drug-Design by R D Jawarkar.pptx
Rahul Jawarkar
 
PPTs-The Rise of Empiresghhhhhhhh (1).pptx
academysrusti114
 
How to Close Subscription in Odoo 18 - Odoo Slides
Celine George
 
HISTORY COLLECTION FOR PSYCHIATRIC PATIENTS.pptx
PoojaSen20
 
The-Invisible-Living-World-Beyond-Our-Naked-Eye chapter 2.pdf/8th science cur...
Sandeep Swamy
 
Study Material and notes for Women Empowerment
ComputerScienceSACWC
 
Five Point Someone – Chetan Bhagat | Book Summary & Analysis by Bhupesh Kushwaha
Bhupesh Kushwaha
 
Tips Management in Odoo 18 POS - Odoo Slides
Celine George
 
CARE OF UNCONSCIOUS PATIENTS .pptx
AneetaSharma15
 
The Minister of Tourism, Culture and Creative Arts, Abla Dzifa Gomashie has e...
nservice241
 
Unit 5: Speech-language and swallowing disorders
JELLA VISHNU DURGA PRASAD
 
FSSAI (Food Safety and Standards Authority of India) & FDA (Food and Drug Adm...
Dr. Paindla Jyothirmai
 
Python Programming Unit II Control Statements.ppt
CUO VEERANAN VEERANAN
 
Odoo 18 Sales_ Managing Quotation Validity
Celine George
 
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
Sunset Boulevard Student Revision Booklet
jpinnuck
 

OOP Introduction with java programming language

  • 1. Md. Al-Imran Lecturer Department of Computer Science & Engineering Dhaka International University Bangladesh
  • 2.   Define OOP  OOP Vs. Structured Programming  Main principle of OOP  Encapsulation  Abstraction  Inheritance  Polymorphism  Overview Contents
  • 3.  Object-oriented programming is a method of implementation in which programs are organized as cooperative collections of objects, each of which represents an instance of some class, and whose classes are all members of one or more hierarchy of classes united via inheritance relationships. What is OOP ?
  • 4.  Structure Programming Object Oriented Programming Top to Bottom Design Object focused design Structure determines execution flow Conversion determines execution flow. Moderately complex program Very Complex Program Less data security More security Less flexible More flexible Less reusability More reusability Less abstraction More abstraction Structure Programming Vs. OOP
  • 5.  Reusability Platform Independent Security Client/Sever Application Graphical User Interface Design Pattern Portability (WORA) Why Java?
  • 6.   Write Ones Run Anywhere WORA
  • 7.   Fundamental Principles of Object Oriented Programming: 1. Encapsulation. 2. Abstraction. 3. Inheritance. 4. Polymorphism. Main principle of OOP
  • 8.   Encapsulation is the mechanism that binds together code and the data it manipulates, and keeps both safe from outside interference and misuse. Encapsulation
  • 9.  i. Protection ii. Consistency iii. Allows change Advantages of Encapsulation
  • 10.  abstraction is a process of hiding the implementation details from the user, only the functionality will be provided to the user. In other words, the user will have the information on what the object does instead of how it does.  In Java, abstraction is achieved using Abstract classes and interfaces. Abstraction
  • 11.   An abstract class is a class that is declared with abstract keyword.  An abstract method is a method that is declared without an implementation.  An abstract class may or may not have all abstract methods. Some of them can be concrete methods.  A method defined abstract must always be redefined in the subclass,  Any class that contains one or more abstract methods must also be declared with abstract keyword.  There can be no object of an abstract class. That is, an abstract class can not be directly instantiated with the new operator. Abstract Class Vs. Abstract Method
  • 12.   Inheritance is the process by which one object acquires the properties of another object.  A class that is derived from another class is called a subclass(also a derived class, extended class, or child class).  The class from which the subclass is derived is called a super class (also a base class or a parent class). Inheritance
  • 13.   The sub-class inherits the base class’ data members and member functions.  A sub-class has all data members of its base-class plus its own.  A sub-class has all member functions of its base class (with changes) plus its own. Cont’d
  • 14.  Inheritance has a lot of benefits  Extensibility  Reusability  Provides abstraction  Eliminates redundant code  Use inheritance for building a relationships E.g. dog is--a animal (dogs are kind of animals) Benefits of Inheritance
  • 15.  Polymorphisms comes from Greek word that means 'many forms'.  More precisely Polymorphisms means the ability to request that the same methods be performed by a wide range of different types of things. Polymorphism
  • 16.   It is achieved by using many different techniques named method overloading and method overriding. Cont’d
  • 17.   Discuss about OOP.  Differentiate Structure Programming and OOP.  Main principles of OOP.  Encapsulation.  Abstraction.  Inheritance.  Polymorphism. Overview