SlideShare a Scribd company logo
3
Most read
12
Most read
16
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

What's hot (20)

PPTX
Object oriented programming
Amit Soni (CTFL)
 
PPTX
Introduction to Java -unit-1
RubaNagarajan
 
PDF
Arrays in Java
Naz Abdalla
 
PPTX
Introduction to java
Veerabadra Badra
 
PPT
Abstract class in java
Lovely Professional University
 
PPTX
Java abstract class & abstract methods
Shubham Dwivedi
 
PPTX
Introduction to oop
colleges
 
PPTX
Type casting in java
Farooq Baloch
 
PPTX
Classes, objects in JAVA
Abhilash Nair
 
PPTX
Java Data Types
Spotle.ai
 
PPT
Basic concepts of object oriented programming
Sachin Sharma
 
PPTX
WHAT IS ABSTRACTION IN JAVA
sivasundari6
 
PPTX
Chapter 05 classes and objects
Praveen M Jigajinni
 
PPT
Oop java
Minal Maniar
 
PPTX
Object Oriented Programing JAVA presentaion
Pritom Chaki
 
PPTX
Java Tokens
Madishetty Prathibha
 
PPTX
Java string handling
Salman Khan
 
PPTX
OOPs in Java
Ranjith Sekar
 
PPT
SQLITE Android
Sourabh Sahu
 
PDF
Class and Objects in Java
Spotle.ai
 
Object oriented programming
Amit Soni (CTFL)
 
Introduction to Java -unit-1
RubaNagarajan
 
Arrays in Java
Naz Abdalla
 
Introduction to java
Veerabadra Badra
 
Abstract class in java
Lovely Professional University
 
Java abstract class & abstract methods
Shubham Dwivedi
 
Introduction to oop
colleges
 
Type casting in java
Farooq Baloch
 
Classes, objects in JAVA
Abhilash Nair
 
Java Data Types
Spotle.ai
 
Basic concepts of object oriented programming
Sachin Sharma
 
WHAT IS ABSTRACTION IN JAVA
sivasundari6
 
Chapter 05 classes and objects
Praveen M Jigajinni
 
Oop java
Minal Maniar
 
Object Oriented Programing JAVA presentaion
Pritom Chaki
 
Java string handling
Salman Khan
 
OOPs in Java
Ranjith Sekar
 
SQLITE Android
Sourabh Sahu
 
Class and Objects in Java
Spotle.ai
 

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
Object Oriented Programming
Iqra khalil
 
PPTX
Basic Concepts Of OOPS/OOPS in Java,C++
Guneesh Basundhra
 
PPTX
Object Oriented Programming Concepts
Abhigyan Singh Yadav
 
PPTX
Object oriented programming
Saiful Islam Sany
 
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
 
PDF
22601221182_RAHUL_MODAK_BCAC301.pdf
ssuser736e06
 
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
 
Object Oriented Programming
Iqra khalil
 
Basic Concepts Of OOPS/OOPS in Java,C++
Guneesh Basundhra
 
Object Oriented Programming Concepts
Abhigyan Singh Yadav
 
Object oriented programming
Saiful Islam Sany
 
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
 
22601221182_RAHUL_MODAK_BCAC301.pdf
ssuser736e06
 
Ad

Recently uploaded (20)

PPTX
MATH 8 QUARTER 1 WEEK 1 LESSON 2 PRESENTATION
JohnGuillerNestalBah1
 
PDF
Cooperative wireless communications 1st Edition Yan Zhang
jsphyftmkb123
 
PDF
Lesson 1 : Science and the Art of Geography Ecosystem
marvinnbustamante1
 
PDF
COM and NET Component Services 1st Edition Juval Löwy
kboqcyuw976
 
PDF
The Power of Compound Interest (Stanford Initiative for Financial Decision-Ma...
Stanford IFDM
 
PPTX
How to Setup Automatic Reordering Rule in Odoo 18 Inventory
Celine George
 
PPTX
ENGLISH 8 REVISED K-12 CURRICULUM QUARTER 1 WEEK 1
LeomarrYsraelArzadon
 
PPTX
The Gift of the Magi by O Henry-A Story of True Love, Sacrifice, and Selfless...
Beena E S
 
PDF
CAD25 Gbadago and Fafa Presentation Revised-Aston Business School, UK.pdf
Kweku Zurek
 
PDF
Supply Chain Security A Comprehensive Approach 1st Edition Arthur G. Arway
rxgnika452
 
PDF
AI-assisted IP-Design lecture from the MIPLM 2025
MIPLM
 
PPTX
Lesson 1 Cell (Structures, Functions, and Theory).pptx
marvinnbustamante1
 
PDF
Genomics Proteomics and Vaccines 1st Edition Guido Grandi (Editor)
kboqcyuw976
 
PDF
TLE 8 QUARTER 1 MODULE WEEK 1 MATATAG CURRICULUM
denniseraya1997
 
PPTX
Aerobic and Anaerobic respiration and CPR.pptx
Olivier Rochester
 
PDF
I3PM Case study smart parking 2025 with uptoIP® and ABP
MIPLM
 
PPTX
grade 8 week 2 ict.pptx. matatag grade 7
VanessaTaberlo
 
PDF
WATERSHED MANAGEMENT CASE STUDIES - ULUGURU MOUNTAINS AND ARVARI RIVERpdf
Ar.Asna
 
PPTX
Ward Management: Patient Care, Personnel, Equipment, and Environment.pptx
PRADEEP ABOTHU
 
PDF
Lesson 1 - Nature of Inquiry and Research.pdf
marvinnbustamante1
 
MATH 8 QUARTER 1 WEEK 1 LESSON 2 PRESENTATION
JohnGuillerNestalBah1
 
Cooperative wireless communications 1st Edition Yan Zhang
jsphyftmkb123
 
Lesson 1 : Science and the Art of Geography Ecosystem
marvinnbustamante1
 
COM and NET Component Services 1st Edition Juval Löwy
kboqcyuw976
 
The Power of Compound Interest (Stanford Initiative for Financial Decision-Ma...
Stanford IFDM
 
How to Setup Automatic Reordering Rule in Odoo 18 Inventory
Celine George
 
ENGLISH 8 REVISED K-12 CURRICULUM QUARTER 1 WEEK 1
LeomarrYsraelArzadon
 
The Gift of the Magi by O Henry-A Story of True Love, Sacrifice, and Selfless...
Beena E S
 
CAD25 Gbadago and Fafa Presentation Revised-Aston Business School, UK.pdf
Kweku Zurek
 
Supply Chain Security A Comprehensive Approach 1st Edition Arthur G. Arway
rxgnika452
 
AI-assisted IP-Design lecture from the MIPLM 2025
MIPLM
 
Lesson 1 Cell (Structures, Functions, and Theory).pptx
marvinnbustamante1
 
Genomics Proteomics and Vaccines 1st Edition Guido Grandi (Editor)
kboqcyuw976
 
TLE 8 QUARTER 1 MODULE WEEK 1 MATATAG CURRICULUM
denniseraya1997
 
Aerobic and Anaerobic respiration and CPR.pptx
Olivier Rochester
 
I3PM Case study smart parking 2025 with uptoIP® and ABP
MIPLM
 
grade 8 week 2 ict.pptx. matatag grade 7
VanessaTaberlo
 
WATERSHED MANAGEMENT CASE STUDIES - ULUGURU MOUNTAINS AND ARVARI RIVERpdf
Ar.Asna
 
Ward Management: Patient Care, Personnel, Equipment, and Environment.pptx
PRADEEP ABOTHU
 
Lesson 1 - Nature of Inquiry and Research.pdf
marvinnbustamante1
 
Ad

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