SlideShare a Scribd company logo
Object Oriented Programming
Chapter 1: Introduction to OOP
Prepared by: Mahmoud Rafeek Alfarra
2016
Salamo 3likom!
I am Mahmoud R. Alfarra
I am here because I love to give knowledge.
Note: I have prepared this material Based on (Liang: “Introduction to Programming using Java”, 10’th edition, 2015)
Outlines
◉ What is Object-Oriented Programming ?
◉ Procedural vs. Object-Oriented Programming
◉ OO Programming Concepts
◉ Concept of Objects and classes
◉ UML Class Diagram
◉ Visibility Modifiers and Accessor Methods
◉ Full Example
‫قال‬ ، ‫عنه‬ ‫اهلل‬ ‫رضي‬ ‫اخلطاب‬ ‫بن‬ ‫عمر‬ ‫عن‬:‫مسعت‬
‫يقول‬ ‫وسلم‬ ‫عليه‬ ‫اهلل‬ ‫صلى‬ ‫اهلل‬ ‫رسول‬:
(،‫نوى‬ ‫ما‬ ‫امريء‬ ‫لكل‬ ‫وإمنا‬ ، ‫ّات‬‫ي‬‫بالن‬ ‫األعمال‬ ‫إمنا‬
‫إىل‬ ‫فهجرته‬ ، ‫ورسوله‬ ‫اهلل‬ ‫إىل‬ ‫هجرته‬ ‫كانت‬ ‫فمن‬
‫أو‬ ، ‫يصيبها‬ ‫لدنيا‬ ‫هجرته‬ ‫كانت‬ ‫ومن‬ ، ‫ورسوله‬ ‫اهلل‬
‫إليه‬ ‫هاجر‬ ‫ما‬ ‫إىل‬ ‫فهجرته‬ ، ‫ينكحها‬ ‫امرأة‬)
‫صحيحهما‬ ‫يف‬ ‫ومسلم‬ ‫البخاري‬ ‫رواه‬
‫وال‬ ‫ستقيم‬ ‫ت‬ ‫وال‬ ‫لو‬ ‫حت‬ ‫ال‬ ‫ياة‬ ‫احل‬
‫عاىل‬ ‫ت‬ ‫اهلل‬ ‫عة‬ ‫بطا‬ ‫إال‬ ‫سهل‬ ‫ت‬
‫ليت‬ ‫ا‬ ‫خالق‬ ‫واأل‬ ‫باآلداب‬ ‫تأدب‬ ‫وال‬
‫شريعته‬ ‫يف‬ ‫لنا‬ ‫وردت‬.
،،، ‫صح‬ ‫عيشها‬
Lecture
Let’s start with the first set of concepts
1
Our Life is a set of
Objects
o To have a fine definition of OOP, Please note what you
are showing in your class room now?
What is OOP?
Chairs
Tables
Teacher
PCs
.
.
# of legs
Type of material
Color
.
.
.
o Object-oriented programming (OOP) involves programming using
objects.
o An object represents an entity in the real world that can be
distinctly identified.
o For example, a student, a desk, a circle, a button, and even a loan
can all be viewed as objects.
o An object has a unique identity, state, and behaviors.
What is OOP?
o The unit in procedural programming
is function.
o Procedural programming
concentrates on creating functions.
o Procedural programming separates
the data of the program from the
operations that manipulate the
data.
Procedural vs. Object-Oriented Programming
o The unit in object-oriented
programming is class.
o Object-oriented programming
starts from isolating the classes,
and then look for the methods
inside them.
o Object-oriented programming
focus on both of them.
Concepts of Object-Oriented Programming
o Abstraction is simplifying complex reality by modeling classes
appropriate to the problem.
o Abstraction is mechanism to show only relevant data to the user.
o i.e: The client cares about what functionality a car offers, not
about how that functionality is implemented.
Abstraction
o Encapsulation allows the programmer to group data and the
methods that operate on them together in one place, and to hide
details from the user.
Encapsulation
AccountValue
Name Address
Change Address
withDraw any value
o Encapsulation protects the integrity of an object's data.
o Protects an object from unwanted access by clients.
 A bank app forbids a client to change an Account's balance.
o Allows you to change the class implementation.
o Allows you to constrain objects' state
Benefits of encapsulation
Abstraction Vs encapsulation
o Inheritance: The ability of a new class to be created from an
existing class by extending it.
Inheritance
Student
Colleague
BCs Diploma
School
Primary Secondary
o Polymorphism enables us to "program in the general" rather than
"program in the specific.
Polymorphism
Practices
Group 1
Compare between
the main concepts of
OOP.
Group 2
Detect 5 objects from
our classroom
Group 3
Diffrenciate between
abstraction and
encabsulation.
Group 4
Diffrenciate between
procedural and Object-
Oriented Programming
Group 5
Give us 3 examples for
inheritance from your
life.
Group 6
Summerize the first
lecture using 1
complext chart.
THANKS!
Any questions?
You can find me at:
Fb/mahmoudRAlfarra
Staff.cst.ps/mfarra
Youtube.com/mralfarra1
@mralfarra

More Related Content

What's hot (20)

Exception Handling in JAVA
Exception Handling in JAVAException Handling in JAVA
Exception Handling in JAVA
SURIT DATTA
 
oops concept in java | object oriented programming in java
oops concept in java | object oriented programming in javaoops concept in java | object oriented programming in java
oops concept in java | object oriented programming in java
CPD INDIA
 
Java features
Java  features Java  features
Java features
Madishetty Prathibha
 
Important features of java
Important features of javaImportant features of java
Important features of java
AL- AMIN
 
OOP Introduction with java programming language
OOP Introduction with java programming languageOOP Introduction with java programming language
OOP Introduction with java programming language
Md.Al-imran Roton
 
Inner classes in java
Inner classes in javaInner classes in java
Inner classes in java
PhD Research Scholar
 
java interface and packages
java interface and packagesjava interface and packages
java interface and packages
VINOTH R
 
Object Oriented Programing JAVA presentaion
Object Oriented Programing JAVA presentaionObject Oriented Programing JAVA presentaion
Object Oriented Programing JAVA presentaion
Pritom Chaki
 
Inheritance in java
Inheritance in javaInheritance in java
Inheritance in java
RahulAnanda1
 
The Evolution of Java
The Evolution of JavaThe Evolution of Java
The Evolution of Java
Fu Cheng
 
OOP java
OOP javaOOP java
OOP java
xball977
 
JVM
JVMJVM
JVM
baabtra.com - No. 1 supplier of quality freshers
 
Exception Handling in Java
Exception Handling in JavaException Handling in Java
Exception Handling in Java
lalithambiga kamaraj
 
Java abstract class & abstract methods
Java abstract class & abstract methodsJava abstract class & abstract methods
Java abstract class & abstract methods
Shubham Dwivedi
 
Abstract Class Presentation
Abstract Class PresentationAbstract Class Presentation
Abstract Class Presentation
tigerwarn
 
Java buzzwords
Java buzzwordsJava buzzwords
Java buzzwords
ramesh517
 
Java Programming
Java ProgrammingJava Programming
Java Programming
Elizabeth alexander
 
Method overloading
Method overloadingMethod overloading
Method overloading
Lovely Professional University
 
Importance & Principles of Modeling from UML Designing
Importance & Principles of Modeling from UML DesigningImportance & Principles of Modeling from UML Designing
Importance & Principles of Modeling from UML Designing
ABHISHEK KUMAR
 
Data Types, Variables, and Operators
Data Types, Variables, and OperatorsData Types, Variables, and Operators
Data Types, Variables, and Operators
Marwa Ali Eissa
 
Exception Handling in JAVA
Exception Handling in JAVAException Handling in JAVA
Exception Handling in JAVA
SURIT DATTA
 
oops concept in java | object oriented programming in java
oops concept in java | object oriented programming in javaoops concept in java | object oriented programming in java
oops concept in java | object oriented programming in java
CPD INDIA
 
Important features of java
Important features of javaImportant features of java
Important features of java
AL- AMIN
 
OOP Introduction with java programming language
OOP Introduction with java programming languageOOP Introduction with java programming language
OOP Introduction with java programming language
Md.Al-imran Roton
 
java interface and packages
java interface and packagesjava interface and packages
java interface and packages
VINOTH R
 
Object Oriented Programing JAVA presentaion
Object Oriented Programing JAVA presentaionObject Oriented Programing JAVA presentaion
Object Oriented Programing JAVA presentaion
Pritom Chaki
 
Inheritance in java
Inheritance in javaInheritance in java
Inheritance in java
RahulAnanda1
 
The Evolution of Java
The Evolution of JavaThe Evolution of Java
The Evolution of Java
Fu Cheng
 
Java abstract class & abstract methods
Java abstract class & abstract methodsJava abstract class & abstract methods
Java abstract class & abstract methods
Shubham Dwivedi
 
Abstract Class Presentation
Abstract Class PresentationAbstract Class Presentation
Abstract Class Presentation
tigerwarn
 
Java buzzwords
Java buzzwordsJava buzzwords
Java buzzwords
ramesh517
 
Importance & Principles of Modeling from UML Designing
Importance & Principles of Modeling from UML DesigningImportance & Principles of Modeling from UML Designing
Importance & Principles of Modeling from UML Designing
ABHISHEK KUMAR
 
Data Types, Variables, and Operators
Data Types, Variables, and OperatorsData Types, Variables, and Operators
Data Types, Variables, and Operators
Marwa Ali Eissa
 

Viewers also liked (20)

‫‫Chapter4 Polymorphism
‫‫Chapter4 Polymorphism‫‫Chapter4 Polymorphism
‫‫Chapter4 Polymorphism
Mahmoud Alfarra
 
Object Oriented Programming_Lecture 2
Object Oriented Programming_Lecture 2Object Oriented Programming_Lecture 2
Object Oriented Programming_Lecture 2
Mahmoud Alfarra
 
البرمجة الهدفية بلغة جافا - مفاهيم أساسية
البرمجة الهدفية بلغة جافا - مفاهيم أساسية البرمجة الهدفية بلغة جافا - مفاهيم أساسية
البرمجة الهدفية بلغة جافا - مفاهيم أساسية
Mahmoud Alfarra
 
Chapter2 array of objects
Chapter2 array of objectsChapter2 array of objects
Chapter2 array of objects
Mahmoud Alfarra
 
البرمجة الهدفية بلغة جافا - مصفوفة الكائنات
البرمجة الهدفية  بلغة جافا - مصفوفة الكائناتالبرمجة الهدفية  بلغة جافا - مصفوفة الكائنات
البرمجة الهدفية بلغة جافا - مصفوفة الكائنات
Mahmoud Alfarra
 
البرمجة الهدفية بلغة جافا - تعدد الأشكال
البرمجة الهدفية بلغة جافا - تعدد الأشكالالبرمجة الهدفية بلغة جافا - تعدد الأشكال
البرمجة الهدفية بلغة جافا - تعدد الأشكال
Mahmoud Alfarra
 
Design final
Design finalDesign final
Design final
Indu Sharma Bhardwaj
 
البرمجة الهدفية بلغة جافا - مقدمة
البرمجة الهدفية بلغة جافا - مقدمةالبرمجة الهدفية بلغة جافا - مقدمة
البرمجة الهدفية بلغة جافا - مقدمة
Mahmoud Alfarra
 
Lecture 17 design concepts (2)
Lecture 17   design concepts (2)Lecture 17   design concepts (2)
Lecture 17 design concepts (2)
IIUI
 
Java Basics
Java BasicsJava Basics
Java Basics
Dhanunjai Bandlamudi
 
Chapter1 - Introduction to Object-Oriented Programming and Software Development
Chapter1 - Introduction to Object-Oriented Programming and Software DevelopmentChapter1 - Introduction to Object-Oriented Programming and Software Development
Chapter1 - Introduction to Object-Oriented Programming and Software Development
Eduardo Bergavera
 
‫Chapter3 inheritance
‫Chapter3 inheritance‫Chapter3 inheritance
‫Chapter3 inheritance
Mahmoud Alfarra
 
Procedural vs. object oriented programming
Procedural vs. object oriented programmingProcedural vs. object oriented programming
Procedural vs. object oriented programming
Haris Bin Zahid
 
Graphs data Structure
Graphs data StructureGraphs data Structure
Graphs data Structure
Mahmoud Alfarra
 
Document clustering and classification
Document clustering and classification Document clustering and classification
Document clustering and classification
Mahmoud Alfarra
 
Java Basics
Java BasicsJava Basics
Java Basics
shivamgarg_nitj
 
Introduction to oops concepts
Introduction to oops conceptsIntroduction to oops concepts
Introduction to oops concepts
Nilesh Dalvi
 
Introduction to Object-Oriented Programming & Design Principles (TCF 2014)
Introduction to Object-Oriented Programming & Design Principles (TCF 2014)Introduction to Object-Oriented Programming & Design Principles (TCF 2014)
Introduction to Object-Oriented Programming & Design Principles (TCF 2014)
Michael Redlich
 
Computer Programming- Lecture 4
Computer Programming- Lecture 4Computer Programming- Lecture 4
Computer Programming- Lecture 4
Dr. Md. Shohel Sayeed
 
Java Tutorial
Java TutorialJava Tutorial
Java Tutorial
Vijay A Raj
 
‫‫Chapter4 Polymorphism
‫‫Chapter4 Polymorphism‫‫Chapter4 Polymorphism
‫‫Chapter4 Polymorphism
Mahmoud Alfarra
 
Object Oriented Programming_Lecture 2
Object Oriented Programming_Lecture 2Object Oriented Programming_Lecture 2
Object Oriented Programming_Lecture 2
Mahmoud Alfarra
 
البرمجة الهدفية بلغة جافا - مفاهيم أساسية
البرمجة الهدفية بلغة جافا - مفاهيم أساسية البرمجة الهدفية بلغة جافا - مفاهيم أساسية
البرمجة الهدفية بلغة جافا - مفاهيم أساسية
Mahmoud Alfarra
 
Chapter2 array of objects
Chapter2 array of objectsChapter2 array of objects
Chapter2 array of objects
Mahmoud Alfarra
 
البرمجة الهدفية بلغة جافا - مصفوفة الكائنات
البرمجة الهدفية  بلغة جافا - مصفوفة الكائناتالبرمجة الهدفية  بلغة جافا - مصفوفة الكائنات
البرمجة الهدفية بلغة جافا - مصفوفة الكائنات
Mahmoud Alfarra
 
البرمجة الهدفية بلغة جافا - تعدد الأشكال
البرمجة الهدفية بلغة جافا - تعدد الأشكالالبرمجة الهدفية بلغة جافا - تعدد الأشكال
البرمجة الهدفية بلغة جافا - تعدد الأشكال
Mahmoud Alfarra
 
البرمجة الهدفية بلغة جافا - مقدمة
البرمجة الهدفية بلغة جافا - مقدمةالبرمجة الهدفية بلغة جافا - مقدمة
البرمجة الهدفية بلغة جافا - مقدمة
Mahmoud Alfarra
 
Lecture 17 design concepts (2)
Lecture 17   design concepts (2)Lecture 17   design concepts (2)
Lecture 17 design concepts (2)
IIUI
 
Chapter1 - Introduction to Object-Oriented Programming and Software Development
Chapter1 - Introduction to Object-Oriented Programming and Software DevelopmentChapter1 - Introduction to Object-Oriented Programming and Software Development
Chapter1 - Introduction to Object-Oriented Programming and Software Development
Eduardo Bergavera
 
Procedural vs. object oriented programming
Procedural vs. object oriented programmingProcedural vs. object oriented programming
Procedural vs. object oriented programming
Haris Bin Zahid
 
Document clustering and classification
Document clustering and classification Document clustering and classification
Document clustering and classification
Mahmoud Alfarra
 
Introduction to oops concepts
Introduction to oops conceptsIntroduction to oops concepts
Introduction to oops concepts
Nilesh Dalvi
 
Introduction to Object-Oriented Programming & Design Principles (TCF 2014)
Introduction to Object-Oriented Programming & Design Principles (TCF 2014)Introduction to Object-Oriented Programming & Design Principles (TCF 2014)
Introduction to Object-Oriented Programming & Design Principles (TCF 2014)
Michael Redlich
 
Ad

Similar to Object Oriented Programming in Java _lecture 1 (20)

Presentation c
Presentation cPresentation c
Presentation c
Kunal Sharma
 
OOPM - Introduction.pptx
OOPM - Introduction.pptxOOPM - Introduction.pptx
OOPM - Introduction.pptx
amitabhaslideshare
 
introduction of Object oriented programming
introduction of Object oriented programmingintroduction of Object oriented programming
introduction of Object oriented programming
RiturajJain8
 
OOP-1.pptx
OOP-1.pptxOOP-1.pptx
OOP-1.pptx
iansebuabeh
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented Programming
Md. Tanvir Hossain
 
yo.pptxoajsdisa odasjd asodjaojdoawjdoasjdow
yo.pptxoajsdisa odasjd asodjaojdoawjdoasjdowyo.pptxoajsdisa odasjd asodjaojdoawjdoasjdow
yo.pptxoajsdisa odasjd asodjaojdoawjdoasjdow
l226207
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
Jasleen Kaur (Chandigarh University)
 
Concepts of Object Oriented Programming By Manju Ashish Buddhaghosh
Concepts  of Object Oriented Programming By Manju Ashish BuddhaghoshConcepts  of Object Oriented Programming By Manju Ashish Buddhaghosh
Concepts of Object Oriented Programming By Manju Ashish Buddhaghosh
abhinav baba
 
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
 
Unit 1 OOSE
Unit 1 OOSE Unit 1 OOSE
Unit 1 OOSE
ChhayaShelake
 
2nd PUC computer science chapter 6 oop concept
2nd PUC computer science chapter 6   oop concept2nd PUC computer science chapter 6   oop concept
2nd PUC computer science chapter 6 oop concept
Aahwini Esware gowda
 
Object Oriented Programming intro Lecture 1.pptx
Object Oriented Programming intro Lecture 1.pptxObject Oriented Programming intro Lecture 1.pptx
Object Oriented Programming intro Lecture 1.pptx
ssuser8d54ed
 
Introduction to Object Oriented Programming.pptx
Introduction to Object Oriented Programming.pptxIntroduction to Object Oriented Programming.pptx
Introduction to Object Oriented Programming.pptx
ssuser8d54ed
 
Object oriented programming (oops) python
Object oriented programming (oops) pythonObject oriented programming (oops) python
Object oriented programming (oops) python
TayyabaIrshad6
 
Introduction to Object Oriented Programming Class IX
Introduction to Object Oriented Programming Class IXIntroduction to Object Oriented Programming Class IX
Introduction to Object Oriented Programming Class IX
Ansh Sam
 
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
 
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
 
C++ notes.pdf
C++ notes.pdfC++ notes.pdf
C++ notes.pdf
RajanBagale3
 
Std 12 computer chapter 6 object oriented concepts (part 1)
Std 12 computer chapter 6 object oriented concepts (part 1)Std 12 computer chapter 6 object oriented concepts (part 1)
Std 12 computer chapter 6 object oriented concepts (part 1)
Nuzhat Memon
 
Object Oriented Programming using C++.pptx
Object Oriented Programming using C++.pptxObject Oriented Programming using C++.pptx
Object Oriented Programming using C++.pptx
parveen837153
 
introduction of Object oriented programming
introduction of Object oriented programmingintroduction of Object oriented programming
introduction of Object oriented programming
RiturajJain8
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented Programming
Md. Tanvir Hossain
 
yo.pptxoajsdisa odasjd asodjaojdoawjdoasjdow
yo.pptxoajsdisa odasjd asodjaojdoawjdoasjdowyo.pptxoajsdisa odasjd asodjaojdoawjdoasjdow
yo.pptxoajsdisa odasjd asodjaojdoawjdoasjdow
l226207
 
Concepts of Object Oriented Programming By Manju Ashish Buddhaghosh
Concepts  of Object Oriented Programming By Manju Ashish BuddhaghoshConcepts  of Object Oriented Programming By Manju Ashish Buddhaghosh
Concepts of Object Oriented Programming By Manju Ashish Buddhaghosh
abhinav baba
 
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
 
2nd PUC computer science chapter 6 oop concept
2nd PUC computer science chapter 6   oop concept2nd PUC computer science chapter 6   oop concept
2nd PUC computer science chapter 6 oop concept
Aahwini Esware gowda
 
Object Oriented Programming intro Lecture 1.pptx
Object Oriented Programming intro Lecture 1.pptxObject Oriented Programming intro Lecture 1.pptx
Object Oriented Programming intro Lecture 1.pptx
ssuser8d54ed
 
Introduction to Object Oriented Programming.pptx
Introduction to Object Oriented Programming.pptxIntroduction to Object Oriented Programming.pptx
Introduction to Object Oriented Programming.pptx
ssuser8d54ed
 
Object oriented programming (oops) python
Object oriented programming (oops) pythonObject oriented programming (oops) python
Object oriented programming (oops) python
TayyabaIrshad6
 
Introduction to Object Oriented Programming Class IX
Introduction to Object Oriented Programming Class IXIntroduction to Object Oriented Programming Class IX
Introduction to Object Oriented Programming Class IX
Ansh Sam
 
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
 
Std 12 computer chapter 6 object oriented concepts (part 1)
Std 12 computer chapter 6 object oriented concepts (part 1)Std 12 computer chapter 6 object oriented concepts (part 1)
Std 12 computer chapter 6 object oriented concepts (part 1)
Nuzhat Memon
 
Object Oriented Programming using C++.pptx
Object Oriented Programming using C++.pptxObject Oriented Programming using C++.pptx
Object Oriented Programming using C++.pptx
parveen837153
 
Ad

More from Mahmoud Alfarra (20)

Computer Programming, Loops using Java - part 2
Computer Programming, Loops using Java - part 2Computer Programming, Loops using Java - part 2
Computer Programming, Loops using Java - part 2
Mahmoud Alfarra
 
Computer Programming, Loops using Java
Computer Programming, Loops using JavaComputer Programming, Loops using Java
Computer Programming, Loops using Java
Mahmoud Alfarra
 
Chapter 10: hashing data structure
Chapter 10:  hashing data structureChapter 10:  hashing data structure
Chapter 10: hashing data structure
Mahmoud Alfarra
 
Chapter9 graph data structure
Chapter9  graph data structureChapter9  graph data structure
Chapter9 graph data structure
Mahmoud Alfarra
 
Chapter 8: tree data structure
Chapter 8:  tree data structureChapter 8:  tree data structure
Chapter 8: tree data structure
Mahmoud Alfarra
 
Chapter 7: Queue data structure
Chapter 7:  Queue data structureChapter 7:  Queue data structure
Chapter 7: Queue data structure
Mahmoud Alfarra
 
Chapter 6: stack data structure
Chapter 6:  stack data structureChapter 6:  stack data structure
Chapter 6: stack data structure
Mahmoud Alfarra
 
Chapter 5: linked list data structure
Chapter 5: linked list data structureChapter 5: linked list data structure
Chapter 5: linked list data structure
Mahmoud Alfarra
 
Chapter 4: basic search algorithms data structure
Chapter 4: basic search algorithms data structureChapter 4: basic search algorithms data structure
Chapter 4: basic search algorithms data structure
Mahmoud Alfarra
 
Chapter 3: basic sorting algorithms data structure
Chapter 3: basic sorting algorithms data structureChapter 3: basic sorting algorithms data structure
Chapter 3: basic sorting algorithms data structure
Mahmoud Alfarra
 
Chapter 2: array and array list data structure
Chapter 2: array and array list  data structureChapter 2: array and array list  data structure
Chapter 2: array and array list data structure
Mahmoud Alfarra
 
Chapter1 intro toprincipleofc#_datastructure_b_cs
Chapter1  intro toprincipleofc#_datastructure_b_csChapter1  intro toprincipleofc#_datastructure_b_cs
Chapter1 intro toprincipleofc#_datastructure_b_cs
Mahmoud Alfarra
 
Chapter 0: introduction to data structure
Chapter 0: introduction to data structureChapter 0: introduction to data structure
Chapter 0: introduction to data structure
Mahmoud Alfarra
 
3 classification
3  classification3  classification
3 classification
Mahmoud Alfarra
 
8 programming-using-java decision-making practices 20102011
8 programming-using-java decision-making practices 201020118 programming-using-java decision-making practices 20102011
8 programming-using-java decision-making practices 20102011
Mahmoud Alfarra
 
7 programming-using-java decision-making220102011
7 programming-using-java decision-making2201020117 programming-using-java decision-making220102011
7 programming-using-java decision-making220102011
Mahmoud Alfarra
 
6 programming-using-java decision-making20102011-
6 programming-using-java decision-making20102011-6 programming-using-java decision-making20102011-
6 programming-using-java decision-making20102011-
Mahmoud Alfarra
 
5 programming-using-java intro-tooop20102011
5 programming-using-java intro-tooop201020115 programming-using-java intro-tooop20102011
5 programming-using-java intro-tooop20102011
Mahmoud Alfarra
 
4 programming-using-java intro-tojava20102011
4 programming-using-java intro-tojava201020114 programming-using-java intro-tojava20102011
4 programming-using-java intro-tojava20102011
Mahmoud Alfarra
 
3 programming-using-java introduction-to computer
3 programming-using-java introduction-to computer3 programming-using-java introduction-to computer
3 programming-using-java introduction-to computer
Mahmoud Alfarra
 
Computer Programming, Loops using Java - part 2
Computer Programming, Loops using Java - part 2Computer Programming, Loops using Java - part 2
Computer Programming, Loops using Java - part 2
Mahmoud Alfarra
 
Computer Programming, Loops using Java
Computer Programming, Loops using JavaComputer Programming, Loops using Java
Computer Programming, Loops using Java
Mahmoud Alfarra
 
Chapter 10: hashing data structure
Chapter 10:  hashing data structureChapter 10:  hashing data structure
Chapter 10: hashing data structure
Mahmoud Alfarra
 
Chapter9 graph data structure
Chapter9  graph data structureChapter9  graph data structure
Chapter9 graph data structure
Mahmoud Alfarra
 
Chapter 8: tree data structure
Chapter 8:  tree data structureChapter 8:  tree data structure
Chapter 8: tree data structure
Mahmoud Alfarra
 
Chapter 7: Queue data structure
Chapter 7:  Queue data structureChapter 7:  Queue data structure
Chapter 7: Queue data structure
Mahmoud Alfarra
 
Chapter 6: stack data structure
Chapter 6:  stack data structureChapter 6:  stack data structure
Chapter 6: stack data structure
Mahmoud Alfarra
 
Chapter 5: linked list data structure
Chapter 5: linked list data structureChapter 5: linked list data structure
Chapter 5: linked list data structure
Mahmoud Alfarra
 
Chapter 4: basic search algorithms data structure
Chapter 4: basic search algorithms data structureChapter 4: basic search algorithms data structure
Chapter 4: basic search algorithms data structure
Mahmoud Alfarra
 
Chapter 3: basic sorting algorithms data structure
Chapter 3: basic sorting algorithms data structureChapter 3: basic sorting algorithms data structure
Chapter 3: basic sorting algorithms data structure
Mahmoud Alfarra
 
Chapter 2: array and array list data structure
Chapter 2: array and array list  data structureChapter 2: array and array list  data structure
Chapter 2: array and array list data structure
Mahmoud Alfarra
 
Chapter1 intro toprincipleofc#_datastructure_b_cs
Chapter1  intro toprincipleofc#_datastructure_b_csChapter1  intro toprincipleofc#_datastructure_b_cs
Chapter1 intro toprincipleofc#_datastructure_b_cs
Mahmoud Alfarra
 
Chapter 0: introduction to data structure
Chapter 0: introduction to data structureChapter 0: introduction to data structure
Chapter 0: introduction to data structure
Mahmoud Alfarra
 
8 programming-using-java decision-making practices 20102011
8 programming-using-java decision-making practices 201020118 programming-using-java decision-making practices 20102011
8 programming-using-java decision-making practices 20102011
Mahmoud Alfarra
 
7 programming-using-java decision-making220102011
7 programming-using-java decision-making2201020117 programming-using-java decision-making220102011
7 programming-using-java decision-making220102011
Mahmoud Alfarra
 
6 programming-using-java decision-making20102011-
6 programming-using-java decision-making20102011-6 programming-using-java decision-making20102011-
6 programming-using-java decision-making20102011-
Mahmoud Alfarra
 
5 programming-using-java intro-tooop20102011
5 programming-using-java intro-tooop201020115 programming-using-java intro-tooop20102011
5 programming-using-java intro-tooop20102011
Mahmoud Alfarra
 
4 programming-using-java intro-tojava20102011
4 programming-using-java intro-tojava201020114 programming-using-java intro-tojava20102011
4 programming-using-java intro-tojava20102011
Mahmoud Alfarra
 
3 programming-using-java introduction-to computer
3 programming-using-java introduction-to computer3 programming-using-java introduction-to computer
3 programming-using-java introduction-to computer
Mahmoud Alfarra
 

Recently uploaded (20)

Final Sketch Designs for poster production.pptx
Final Sketch Designs for poster production.pptxFinal Sketch Designs for poster production.pptx
Final Sketch Designs for poster production.pptx
bobby205207
 
PEST OF WHEAT SORGHUM BAJRA and MINOR MILLETS.pptx
PEST OF WHEAT SORGHUM BAJRA and MINOR MILLETS.pptxPEST OF WHEAT SORGHUM BAJRA and MINOR MILLETS.pptx
PEST OF WHEAT SORGHUM BAJRA and MINOR MILLETS.pptx
Arshad Shaikh
 
BUSINESS QUIZ PRELIMS | QUIZ CLUB OF PSGCAS | 9 SEPTEMBER 2024
BUSINESS QUIZ PRELIMS | QUIZ CLUB OF PSGCAS | 9 SEPTEMBER 2024BUSINESS QUIZ PRELIMS | QUIZ CLUB OF PSGCAS | 9 SEPTEMBER 2024
BUSINESS QUIZ PRELIMS | QUIZ CLUB OF PSGCAS | 9 SEPTEMBER 2024
Quiz Club of PSG College of Arts & Science
 
How to Manage Upselling of Subscriptions in Odoo 18
How to Manage Upselling of Subscriptions in Odoo 18How to Manage Upselling of Subscriptions in Odoo 18
How to Manage Upselling of Subscriptions in Odoo 18
Celine George
 
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
 
Sustainable Innovation with Immersive Learning
Sustainable Innovation with Immersive LearningSustainable Innovation with Immersive Learning
Sustainable Innovation with Immersive Learning
Leonel Morgado
 
SPENT QUIZ NQL JR FEST 5.0 BY SOURAV.pptx
SPENT QUIZ NQL JR FEST 5.0 BY SOURAV.pptxSPENT QUIZ NQL JR FEST 5.0 BY SOURAV.pptx
SPENT QUIZ NQL JR FEST 5.0 BY SOURAV.pptx
Sourav Kr Podder
 
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
 
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
 
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
 
Nice Dream.pdf /
Nice Dream.pdf                              /Nice Dream.pdf                              /
Nice Dream.pdf /
ErinUsher3
 
LDMMIA Spring Ending Guest Grad Student News
LDMMIA Spring Ending Guest Grad Student NewsLDMMIA Spring Ending Guest Grad Student News
LDMMIA Spring Ending Guest Grad Student News
LDM & Mia eStudios
 
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
 
How to Manage Inventory Movement in Odoo 18 POS
How to Manage Inventory Movement in Odoo 18 POSHow to Manage Inventory Movement in Odoo 18 POS
How to Manage Inventory Movement in Odoo 18 POS
Celine George
 
How to Create an Event in Odoo 18 - Odoo 18 Slides
How to Create an Event in Odoo 18 - Odoo 18 SlidesHow to Create an Event in Odoo 18 - Odoo 18 Slides
How to Create an Event in Odoo 18 - Odoo 18 Slides
Celine George
 
How to Manage & Create a New Department in Odoo 18 Employee
How to Manage & Create a New Department in Odoo 18 EmployeeHow to Manage & Create a New Department in Odoo 18 Employee
How to Manage & Create a New Department in Odoo 18 Employee
Celine George
 
The Man In The Back – Exceptional Delaware.pdf
The Man In The Back – Exceptional Delaware.pdfThe Man In The Back – Exceptional Delaware.pdf
The Man In The Back – Exceptional Delaware.pdf
dennisongomezk
 
How to Manage Multi Language for Invoice in Odoo 18
How to Manage Multi Language for Invoice in Odoo 18How to Manage Multi Language for Invoice in Odoo 18
How to Manage Multi Language for Invoice in Odoo 18
Celine George
 
Basic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Basic English for Communication - Dr Hj Euis Eti Rohaeti MpdBasic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Basic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Restu Bias Primandhika
 
BINARY files CSV files JSON files with example.pptx
BINARY files CSV files JSON files with example.pptxBINARY files CSV files JSON files with example.pptx
BINARY files CSV files JSON files with example.pptx
Ramakrishna Reddy Bijjam
 
Final Sketch Designs for poster production.pptx
Final Sketch Designs for poster production.pptxFinal Sketch Designs for poster production.pptx
Final Sketch Designs for poster production.pptx
bobby205207
 
PEST OF WHEAT SORGHUM BAJRA and MINOR MILLETS.pptx
PEST OF WHEAT SORGHUM BAJRA and MINOR MILLETS.pptxPEST OF WHEAT SORGHUM BAJRA and MINOR MILLETS.pptx
PEST OF WHEAT SORGHUM BAJRA and MINOR MILLETS.pptx
Arshad Shaikh
 
How to Manage Upselling of Subscriptions in Odoo 18
How to Manage Upselling of Subscriptions in Odoo 18How to Manage Upselling of Subscriptions in Odoo 18
How to Manage Upselling of Subscriptions in Odoo 18
Celine George
 
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
 
Sustainable Innovation with Immersive Learning
Sustainable Innovation with Immersive LearningSustainable Innovation with Immersive Learning
Sustainable Innovation with Immersive Learning
Leonel Morgado
 
SPENT QUIZ NQL JR FEST 5.0 BY SOURAV.pptx
SPENT QUIZ NQL JR FEST 5.0 BY SOURAV.pptxSPENT QUIZ NQL JR FEST 5.0 BY SOURAV.pptx
SPENT QUIZ NQL JR FEST 5.0 BY SOURAV.pptx
Sourav Kr Podder
 
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
 
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
 
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
 
Nice Dream.pdf /
Nice Dream.pdf                              /Nice Dream.pdf                              /
Nice Dream.pdf /
ErinUsher3
 
LDMMIA Spring Ending Guest Grad Student News
LDMMIA Spring Ending Guest Grad Student NewsLDMMIA Spring Ending Guest Grad Student News
LDMMIA Spring Ending Guest Grad Student News
LDM & Mia eStudios
 
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
 
How to Manage Inventory Movement in Odoo 18 POS
How to Manage Inventory Movement in Odoo 18 POSHow to Manage Inventory Movement in Odoo 18 POS
How to Manage Inventory Movement in Odoo 18 POS
Celine George
 
How to Create an Event in Odoo 18 - Odoo 18 Slides
How to Create an Event in Odoo 18 - Odoo 18 SlidesHow to Create an Event in Odoo 18 - Odoo 18 Slides
How to Create an Event in Odoo 18 - Odoo 18 Slides
Celine George
 
How to Manage & Create a New Department in Odoo 18 Employee
How to Manage & Create a New Department in Odoo 18 EmployeeHow to Manage & Create a New Department in Odoo 18 Employee
How to Manage & Create a New Department in Odoo 18 Employee
Celine George
 
The Man In The Back – Exceptional Delaware.pdf
The Man In The Back – Exceptional Delaware.pdfThe Man In The Back – Exceptional Delaware.pdf
The Man In The Back – Exceptional Delaware.pdf
dennisongomezk
 
How to Manage Multi Language for Invoice in Odoo 18
How to Manage Multi Language for Invoice in Odoo 18How to Manage Multi Language for Invoice in Odoo 18
How to Manage Multi Language for Invoice in Odoo 18
Celine George
 
Basic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Basic English for Communication - Dr Hj Euis Eti Rohaeti MpdBasic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Basic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Restu Bias Primandhika
 
BINARY files CSV files JSON files with example.pptx
BINARY files CSV files JSON files with example.pptxBINARY files CSV files JSON files with example.pptx
BINARY files CSV files JSON files with example.pptx
Ramakrishna Reddy Bijjam
 

Object Oriented Programming in Java _lecture 1

  • 1. Object Oriented Programming Chapter 1: Introduction to OOP Prepared by: Mahmoud Rafeek Alfarra 2016
  • 2. Salamo 3likom! I am Mahmoud R. Alfarra I am here because I love to give knowledge. Note: I have prepared this material Based on (Liang: “Introduction to Programming using Java”, 10’th edition, 2015)
  • 3. Outlines ◉ What is Object-Oriented Programming ? ◉ Procedural vs. Object-Oriented Programming ◉ OO Programming Concepts ◉ Concept of Objects and classes ◉ UML Class Diagram ◉ Visibility Modifiers and Accessor Methods ◉ Full Example
  • 4. ‫قال‬ ، ‫عنه‬ ‫اهلل‬ ‫رضي‬ ‫اخلطاب‬ ‫بن‬ ‫عمر‬ ‫عن‬:‫مسعت‬ ‫يقول‬ ‫وسلم‬ ‫عليه‬ ‫اهلل‬ ‫صلى‬ ‫اهلل‬ ‫رسول‬: (،‫نوى‬ ‫ما‬ ‫امريء‬ ‫لكل‬ ‫وإمنا‬ ، ‫ّات‬‫ي‬‫بالن‬ ‫األعمال‬ ‫إمنا‬ ‫إىل‬ ‫فهجرته‬ ، ‫ورسوله‬ ‫اهلل‬ ‫إىل‬ ‫هجرته‬ ‫كانت‬ ‫فمن‬ ‫أو‬ ، ‫يصيبها‬ ‫لدنيا‬ ‫هجرته‬ ‫كانت‬ ‫ومن‬ ، ‫ورسوله‬ ‫اهلل‬ ‫إليه‬ ‫هاجر‬ ‫ما‬ ‫إىل‬ ‫فهجرته‬ ، ‫ينكحها‬ ‫امرأة‬) ‫صحيحهما‬ ‫يف‬ ‫ومسلم‬ ‫البخاري‬ ‫رواه‬ ‫وال‬ ‫ستقيم‬ ‫ت‬ ‫وال‬ ‫لو‬ ‫حت‬ ‫ال‬ ‫ياة‬ ‫احل‬ ‫عاىل‬ ‫ت‬ ‫اهلل‬ ‫عة‬ ‫بطا‬ ‫إال‬ ‫سهل‬ ‫ت‬ ‫ليت‬ ‫ا‬ ‫خالق‬ ‫واأل‬ ‫باآلداب‬ ‫تأدب‬ ‫وال‬ ‫شريعته‬ ‫يف‬ ‫لنا‬ ‫وردت‬. ،،، ‫صح‬ ‫عيشها‬
  • 5. Lecture Let’s start with the first set of concepts 1
  • 6. Our Life is a set of Objects
  • 7. o To have a fine definition of OOP, Please note what you are showing in your class room now? What is OOP? Chairs Tables Teacher PCs . . # of legs Type of material Color . . .
  • 8. o Object-oriented programming (OOP) involves programming using objects. o An object represents an entity in the real world that can be distinctly identified. o For example, a student, a desk, a circle, a button, and even a loan can all be viewed as objects. o An object has a unique identity, state, and behaviors. What is OOP?
  • 9. o The unit in procedural programming is function. o Procedural programming concentrates on creating functions. o Procedural programming separates the data of the program from the operations that manipulate the data. Procedural vs. Object-Oriented Programming o The unit in object-oriented programming is class. o Object-oriented programming starts from isolating the classes, and then look for the methods inside them. o Object-oriented programming focus on both of them.
  • 11. o Abstraction is simplifying complex reality by modeling classes appropriate to the problem. o Abstraction is mechanism to show only relevant data to the user. o i.e: The client cares about what functionality a car offers, not about how that functionality is implemented. Abstraction
  • 12. o Encapsulation allows the programmer to group data and the methods that operate on them together in one place, and to hide details from the user. Encapsulation AccountValue Name Address Change Address withDraw any value
  • 13. o Encapsulation protects the integrity of an object's data. o Protects an object from unwanted access by clients.  A bank app forbids a client to change an Account's balance. o Allows you to change the class implementation. o Allows you to constrain objects' state Benefits of encapsulation
  • 15. o Inheritance: The ability of a new class to be created from an existing class by extending it. Inheritance Student Colleague BCs Diploma School Primary Secondary
  • 16. o Polymorphism enables us to "program in the general" rather than "program in the specific. Polymorphism
  • 17. Practices Group 1 Compare between the main concepts of OOP. Group 2 Detect 5 objects from our classroom Group 3 Diffrenciate between abstraction and encabsulation. Group 4 Diffrenciate between procedural and Object- Oriented Programming Group 5 Give us 3 examples for inheritance from your life. Group 6 Summerize the first lecture using 1 complext chart.
  • 18. THANKS! Any questions? You can find me at: Fb/mahmoudRAlfarra Staff.cst.ps/mfarra Youtube.com/mralfarra1 @mralfarra