SlideShare a Scribd company logo
1 of 35
Think With Java
Mapping Real World Object with Java
A Society ( Group of families)
A Society ( Group of families)
Everything in the World is an Object (Society,
Family, Human, Cat, Dog, Car, River)
A society is a group of families.
Families are collections of Family member.
Each Family member is Human or Non Human.
Each family member has some responsibilities
(Activity) and they have their own properties.
Family members are interconnected to each
other.
A Society ( Group of families)
Each member is a human or non human.
Human beings are persons.
Each Human has common behavior comes
from Animal.
Each family member uses their guardians
vehicle or their own.
Each and every Human being has their own
Address.
Humans(Objects) Behavior
Object is an entity which has
State: determined by the values of its
properties.
Behavior: determined by how an object
performs an activity.
Humans(Objects) Properties &
Behavior/Activity
Every human(Male / Female / Other) has
common properties and also they have their
Behavior.
Properties: Name, Head, Hands, Hair,
Eyes(color , size), Nose, Address.
Behavior: Walking, Running, Playing, Gaining
Knowledge, Talking.
Map Now the Real World
Objects
Java Class or Java Bean
A simple Object instance container.
It has some properties and behavior.
So we can map our real world objects through
Java .
Properties: nationalId,
name, Address,
vehicle, PassportInfo,
Occupation
Behavior: Walking,
Running, Shopping,
Talking, Cycling,Driving
Access Modifier in java for
properties and behavior
Public:
A declaration that is accessible to all classes
with keyword “public”
Private:
A declaration that is accessible only to the class
in which it is declared with “private”.
Access Modifier in java for
properties and behavior
Java OOP feature(Abstraction)
Customer should
know to buy something
BillingStaff should
know products pricing
and to generate bill.
Administrator should
product sell and to buy
new products to gain
business goal and to
manage everything in
ABSTRACTION: concept of identifying the essential details to be
known and ignoring the non-essential details from the perspective
of the end user.
Retail Shop Scenario
A simple Shopping Scenario
of Abstraction
Encapsulation
The Student don’t have to know the calculation
mechanism of Calculator.
He/she just know its use of button.
ENCAPSULATION: concept of hiding the internal
details and providing a simple interface to the end
user which ensures that the system can be used
without having to know how it works.
A Calculator Scenario
of Encapsulation
Inheritance
Each Human have some common behavior of
Animal.
Every family members are human or non-
human(Cat or dog).
Each Regular or Privileged Customer have
common Properties.
Different Inheritance
Inheritance
Allows to define the generalized and
specialized characteristics and behavior. Multiple Inheritance
Inheritance
Allows to define the generalized and
specialized characteristics and behavior.
Multi level Inheritance
Polymorphism
Let us revisit the payment activity in the retail shop
Paymlent of bill can be done in two modes
Cash(Calculation includes VAT)
totalAmount = purchaseAmount + VAT
Credit Card(Calculation includes processing charge and
VAT)
totalAmount = purchaseAmount + VAT+
processingCharge
POLYMORPHISM: concept which allows on
objecct/operation to behave differently in different
situations.
So ? Now it is payment(processingCharge) or
payment()?
Polymorphism
Polymorphism is the
capability of a method
to do different things
based on the object
that it is acting upon
Following concepts
demonstrate different
types of polymorphism
in java.
1) Method
Overloading
2) Method
Static Binding vs Dynamic
Binding
difference between static and dynamic
binding in Java.
Static binding happens at compile-time while
dynamic binding happens at runtime.
Binding of private, static and final methods
always happen at compile time since these
methods cannot be overridden. Binding of
overridden methods happen at runtime.
Java uses static binding for overloaded
methods and dynamic binding for overridden
methods.
Dynamic Polymorphism(dynamic
binding) example
Abstract class & abstract
Method
If you declare an abstract
method (discussed below)
in a class then you must
declare the class abstract
as well. you can’t have
abstract method in a non-
abstract class.
What is an interface
Interface looks like class but it is not a class. An
interface can have methods and variables just
like the class but the methods declared in
interface are by default abstract (only method
signature, no body). Also, the variables declared
in an interface are public, static & final by
default.
** java programming language does not
support multiple inheritance (we can do this
through Interface)
Interface and abstract
Interface provides complete abstraction as
none of its methods can have body. On the other
hand, abstract class provides partial
abstraction as it can have abstract and
concrete(methods with body) methods both.
Use of Interface
Use of Interface with “abstract”
keyword
Relationship in Java classes
Is A (Inheritance)
Has A (Aggregation)  Tightly coupled
Uses (Association)  Loosely coupled
Relationship in Java classes
What next. . . . . .
ORM = Object Relational Mapping
ORM Providers : JPA, Hibernate, Spring, OFBiz
MVC = Model View Controller
MVC provider : JSF, Hibernate, Spring, OFBiz
etc.
A Strong Tool : Collection Framework
To work with data in the local machine or
memory must use the collection framework.
Collections--> Set, List, ArrayList, Map,
LinkedHashMap
Collection Framework overview.
Collections Example
Questions & Answers
 Fun with Java :)
Thanks to all…
Md. Arifur Rahman
Junior Software Engineer,
Newgen Technology Limited, Bangladesh.

More Related Content

What's hot

39f1b9a797dbms chapter2 b.sc2
39f1b9a797dbms chapter2 b.sc239f1b9a797dbms chapter2 b.sc2
39f1b9a797dbms chapter2 b.sc2Mukund Trivedi
 
39f1b9a797dbms chapter2 b.sc2 (1)
39f1b9a797dbms chapter2 b.sc2 (1)39f1b9a797dbms chapter2 b.sc2 (1)
39f1b9a797dbms chapter2 b.sc2 (1)Mukund Trivedi
 
friend function(c++)
friend function(c++)friend function(c++)
friend function(c++)Ritika Sharma
 
E-R diagram in Database
E-R diagram in DatabaseE-R diagram in Database
E-R diagram in DatabaseFatiha Qureshi
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship DiagramShakila Mahjabin
 
The entity relationship model
The entity relationship modelThe entity relationship model
The entity relationship modelJane Garay
 
Lecture#01, object orientation
Lecture#01, object orientationLecture#01, object orientation
Lecture#01, object orientationbabak danyal
 
Classes, objects, methods, constructors, this keyword in java
Classes, objects, methods, constructors, this keyword  in javaClasses, objects, methods, constructors, this keyword  in java
Classes, objects, methods, constructors, this keyword in javaTharuniDiddekunta
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagramssadique_ghitm
 
The entity relationship model
The entity relationship modelThe entity relationship model
The entity relationship modelyash patel
 

What's hot (19)

Class diagrams
Class diagramsClass diagrams
Class diagrams
 
39f1b9a797dbms chapter2 b.sc2
39f1b9a797dbms chapter2 b.sc239f1b9a797dbms chapter2 b.sc2
39f1b9a797dbms chapter2 b.sc2
 
39f1b9a797dbms chapter2 b.sc2 (1)
39f1b9a797dbms chapter2 b.sc2 (1)39f1b9a797dbms chapter2 b.sc2 (1)
39f1b9a797dbms chapter2 b.sc2 (1)
 
friend function(c++)
friend function(c++)friend function(c++)
friend function(c++)
 
java tr.docx
java tr.docxjava tr.docx
java tr.docx
 
E-R diagram in Database
E-R diagram in DatabaseE-R diagram in Database
E-R diagram in Database
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
The entity relationship model
The entity relationship modelThe entity relationship model
The entity relationship model
 
Lecture#01, object orientation
Lecture#01, object orientationLecture#01, object orientation
Lecture#01, object orientation
 
8815346
88153468815346
8815346
 
Inheritance
InheritanceInheritance
Inheritance
 
Classes, objects, methods, constructors, this keyword in java
Classes, objects, methods, constructors, this keyword  in javaClasses, objects, methods, constructors, this keyword  in java
Classes, objects, methods, constructors, this keyword in java
 
Oo ps exam answer2
Oo ps exam answer2Oo ps exam answer2
Oo ps exam answer2
 
Demystifying oop
Demystifying oopDemystifying oop
Demystifying oop
 
Ch 3 E R Model
Ch 3  E R  ModelCh 3  E R  Model
Ch 3 E R Model
 
Inheritance used in java
Inheritance used in javaInheritance used in java
Inheritance used in java
 
Dbms question (3)
Dbms question (3)Dbms question (3)
Dbms question (3)
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagrams
 
The entity relationship model
The entity relationship modelThe entity relationship model
The entity relationship model
 

Viewers also liked

Mapping in Java Options
Mapping in Java OptionsMapping in Java Options
Mapping in Java OptionsAnna Pietras
 
Modulo 1 andrea perez
Modulo 1 andrea perezModulo 1 andrea perez
Modulo 1 andrea perezAndrea Peréz
 
DISCOVERING DIFFERENCES IN GENDER-RELATED SKELETAL MUSCLE AGING THROUGH THE M...
DISCOVERING DIFFERENCES IN GENDER-RELATED SKELETAL MUSCLE AGING THROUGH THE M...DISCOVERING DIFFERENCES IN GENDER-RELATED SKELETAL MUSCLE AGING THROUGH THE M...
DISCOVERING DIFFERENCES IN GENDER-RELATED SKELETAL MUSCLE AGING THROUGH THE M...ijbbjournal
 
Smart metering and energy efficiency application with CloudIndustries.eu
Smart metering and energy efficiency application with CloudIndustries.euSmart metering and energy efficiency application with CloudIndustries.eu
Smart metering and energy efficiency application with CloudIndustries.euEvaldas Paliliūnas
 
¿Cómo evitamos que se pudra la comida?
¿Cómo evitamos que se pudra la comida?¿Cómo evitamos que se pudra la comida?
¿Cómo evitamos que se pudra la comida?Ruben Lijo
 
Transportation Hubs Project
Transportation Hubs ProjectTransportation Hubs Project
Transportation Hubs ProjectSylviaTM
 
Diapositivas ejemplos sustentables
Diapositivas ejemplos sustentablesDiapositivas ejemplos sustentables
Diapositivas ejemplos sustentableshannakrn22
 
Informe de motor de arranque
Informe de motor de arranqueInforme de motor de arranque
Informe de motor de arranqueJohn Israel
 
Life.Film - EdHack - Chatbots Community
Life.Film - EdHack - Chatbots CommunityLife.Film - EdHack - Chatbots Community
Life.Film - EdHack - Chatbots Communitychatbotscommunity
 
Building RESTful API
Building RESTful APIBuilding RESTful API
Building RESTful APIAnna Pietras
 
Est 506.docx general soil profile
Est 506.docx general soil profileEst 506.docx general soil profile
Est 506.docx general soil profilejaya47
 
Contraception
ContraceptionContraception
Contraceptionakifab93
 

Viewers also liked (20)

Mapping in Java Options
Mapping in Java OptionsMapping in Java Options
Mapping in Java Options
 
Modulo 1 andrea perez
Modulo 1 andrea perezModulo 1 andrea perez
Modulo 1 andrea perez
 
DISCOVERING DIFFERENCES IN GENDER-RELATED SKELETAL MUSCLE AGING THROUGH THE M...
DISCOVERING DIFFERENCES IN GENDER-RELATED SKELETAL MUSCLE AGING THROUGH THE M...DISCOVERING DIFFERENCES IN GENDER-RELATED SKELETAL MUSCLE AGING THROUGH THE M...
DISCOVERING DIFFERENCES IN GENDER-RELATED SKELETAL MUSCLE AGING THROUGH THE M...
 
Smart metering and energy efficiency application with CloudIndustries.eu
Smart metering and energy efficiency application with CloudIndustries.euSmart metering and energy efficiency application with CloudIndustries.eu
Smart metering and energy efficiency application with CloudIndustries.eu
 
Grammar 3 rd term
Grammar 3 rd termGrammar 3 rd term
Grammar 3 rd term
 
¿Cómo evitamos que se pudra la comida?
¿Cómo evitamos que se pudra la comida?¿Cómo evitamos que se pudra la comida?
¿Cómo evitamos que se pudra la comida?
 
Flyer digital en
Flyer digital enFlyer digital en
Flyer digital en
 
Vou subir elaine de jesus
Vou subir   elaine de jesusVou subir   elaine de jesus
Vou subir elaine de jesus
 
Transportation Hubs Project
Transportation Hubs ProjectTransportation Hubs Project
Transportation Hubs Project
 
Diapositivas ejemplos sustentables
Diapositivas ejemplos sustentablesDiapositivas ejemplos sustentables
Diapositivas ejemplos sustentables
 
Informe de motor de arranque
Informe de motor de arranqueInforme de motor de arranque
Informe de motor de arranque
 
Life.Film - EdHack - Chatbots Community
Life.Film - EdHack - Chatbots CommunityLife.Film - EdHack - Chatbots Community
Life.Film - EdHack - Chatbots Community
 
Building RESTful API
Building RESTful APIBuilding RESTful API
Building RESTful API
 
Espaço Público Urbano - Santiago
Espaço Público Urbano - SantiagoEspaço Público Urbano - Santiago
Espaço Público Urbano - Santiago
 
Interação com a comunidade - Paulo Silva (DCSPT)
Interação com a comunidade - Paulo Silva (DCSPT)Interação com a comunidade - Paulo Silva (DCSPT)
Interação com a comunidade - Paulo Silva (DCSPT)
 
Que existe y_que_no
Que existe y_que_noQue existe y_que_no
Que existe y_que_no
 
Quiromasaje
QuiromasajeQuiromasaje
Quiromasaje
 
Est 506.docx general soil profile
Est 506.docx general soil profileEst 506.docx general soil profile
Est 506.docx general soil profile
 
Clothing
ClothingClothing
Clothing
 
Contraception
ContraceptionContraception
Contraception
 

Similar to Think with java

Programming Laboratory Unit 1.pdf
Programming Laboratory Unit 1.pdfProgramming Laboratory Unit 1.pdf
Programming Laboratory Unit 1.pdfswapnilslide2019
 
Oops presentation java
Oops presentation javaOops presentation java
Oops presentation javaJayasankarPR2
 
Md02 - Getting Started part-2
Md02 - Getting Started part-2Md02 - Getting Started part-2
Md02 - Getting Started part-2Rakesh Madugula
 
Hibernate Training Session1
Hibernate Training Session1Hibernate Training Session1
Hibernate Training Session1Asad Khan
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programmingJun Shimizu
 
Java Progamming Paradigms, OOPS Concept, Introduction to Java, Structure of J...
Java Progamming Paradigms, OOPS Concept, Introduction to Java, Structure of J...Java Progamming Paradigms, OOPS Concept, Introduction to Java, Structure of J...
Java Progamming Paradigms, OOPS Concept, Introduction to Java, Structure of J...Sakthi Durai
 
Java Programming Paradigms Chapter 1
Java Programming Paradigms Chapter 1 Java Programming Paradigms Chapter 1
Java Programming Paradigms Chapter 1 Sakthi Durai
 
SAD02 - Object Orientation
SAD02 - Object OrientationSAD02 - Object Orientation
SAD02 - Object OrientationMichael Heron
 
Java is an Object-Oriented Language
Java is an Object-Oriented LanguageJava is an Object-Oriented Language
Java is an Object-Oriented Languageale8819
 
Review oop and ood
Review oop and oodReview oop and ood
Review oop and oodthan sare
 
CHAPTER 1 - OVERVIEW OOP.ppt
CHAPTER 1 - OVERVIEW OOP.pptCHAPTER 1 - OVERVIEW OOP.ppt
CHAPTER 1 - OVERVIEW OOP.pptNgoHuuNhan1
 
Abstraction1
Abstraction1Abstraction1
Abstraction1zindadili
 
introduction to machine learning
introduction to machine learningintroduction to machine learning
introduction to machine learningcolleges
 
Abstract class and Interface
Abstract class and InterfaceAbstract class and Interface
Abstract class and InterfaceHaris Bin Zahid
 

Similar to Think with java (20)

Programming Laboratory Unit 1.pdf
Programming Laboratory Unit 1.pdfProgramming Laboratory Unit 1.pdf
Programming Laboratory Unit 1.pdf
 
Oops presentation java
Oops presentation javaOops presentation java
Oops presentation java
 
Md02 - Getting Started part-2
Md02 - Getting Started part-2Md02 - Getting Started part-2
Md02 - Getting Started part-2
 
Hibernate Training Session1
Hibernate Training Session1Hibernate Training Session1
Hibernate Training Session1
 
Ontology
OntologyOntology
Ontology
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Java Progamming Paradigms, OOPS Concept, Introduction to Java, Structure of J...
Java Progamming Paradigms, OOPS Concept, Introduction to Java, Structure of J...Java Progamming Paradigms, OOPS Concept, Introduction to Java, Structure of J...
Java Progamming Paradigms, OOPS Concept, Introduction to Java, Structure of J...
 
Java Programming Paradigms Chapter 1
Java Programming Paradigms Chapter 1 Java Programming Paradigms Chapter 1
Java Programming Paradigms Chapter 1
 
Uml - An Overview
Uml - An OverviewUml - An Overview
Uml - An Overview
 
SAD02 - Object Orientation
SAD02 - Object OrientationSAD02 - Object Orientation
SAD02 - Object Orientation
 
Java is an Object-Oriented Language
Java is an Object-Oriented LanguageJava is an Object-Oriented Language
Java is an Object-Oriented Language
 
java
javajava
java
 
Review oop and ood
Review oop and oodReview oop and ood
Review oop and ood
 
Java interfaces
Java interfacesJava interfaces
Java interfaces
 
CHAPTER 1 - OVERVIEW OOP.ppt
CHAPTER 1 - OVERVIEW OOP.pptCHAPTER 1 - OVERVIEW OOP.ppt
CHAPTER 1 - OVERVIEW OOP.ppt
 
Abstraction1
Abstraction1Abstraction1
Abstraction1
 
Java basics
Java basicsJava basics
Java basics
 
introduction to machine learning
introduction to machine learningintroduction to machine learning
introduction to machine learning
 
Abstract class and Interface
Abstract class and InterfaceAbstract class and Interface
Abstract class and Interface
 
2.oop concept
2.oop concept2.oop concept
2.oop concept
 

Recently uploaded

Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 

Recently uploaded (20)

Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 

Think with java

  • 1. Think With Java Mapping Real World Object with Java
  • 2. A Society ( Group of families)
  • 3. A Society ( Group of families) Everything in the World is an Object (Society, Family, Human, Cat, Dog, Car, River) A society is a group of families. Families are collections of Family member. Each Family member is Human or Non Human. Each family member has some responsibilities (Activity) and they have their own properties. Family members are interconnected to each other.
  • 4. A Society ( Group of families) Each member is a human or non human. Human beings are persons. Each Human has common behavior comes from Animal. Each family member uses their guardians vehicle or their own. Each and every Human being has their own Address.
  • 5. Humans(Objects) Behavior Object is an entity which has State: determined by the values of its properties. Behavior: determined by how an object performs an activity.
  • 6. Humans(Objects) Properties & Behavior/Activity Every human(Male / Female / Other) has common properties and also they have their Behavior. Properties: Name, Head, Hands, Hair, Eyes(color , size), Nose, Address. Behavior: Walking, Running, Playing, Gaining Knowledge, Talking.
  • 7. Map Now the Real World Objects
  • 8. Java Class or Java Bean A simple Object instance container. It has some properties and behavior. So we can map our real world objects through Java . Properties: nationalId, name, Address, vehicle, PassportInfo, Occupation Behavior: Walking, Running, Shopping, Talking, Cycling,Driving
  • 9. Access Modifier in java for properties and behavior Public: A declaration that is accessible to all classes with keyword “public” Private: A declaration that is accessible only to the class in which it is declared with “private”.
  • 10. Access Modifier in java for properties and behavior
  • 11. Java OOP feature(Abstraction) Customer should know to buy something BillingStaff should know products pricing and to generate bill. Administrator should product sell and to buy new products to gain business goal and to manage everything in ABSTRACTION: concept of identifying the essential details to be known and ignoring the non-essential details from the perspective of the end user. Retail Shop Scenario
  • 12. A simple Shopping Scenario of Abstraction
  • 13. Encapsulation The Student don’t have to know the calculation mechanism of Calculator. He/she just know its use of button. ENCAPSULATION: concept of hiding the internal details and providing a simple interface to the end user which ensures that the system can be used without having to know how it works.
  • 14. A Calculator Scenario of Encapsulation
  • 15. Inheritance Each Human have some common behavior of Animal. Every family members are human or non- human(Cat or dog). Each Regular or Privileged Customer have common Properties.
  • 17. Inheritance Allows to define the generalized and specialized characteristics and behavior. Multiple Inheritance
  • 18. Inheritance Allows to define the generalized and specialized characteristics and behavior. Multi level Inheritance
  • 19. Polymorphism Let us revisit the payment activity in the retail shop Paymlent of bill can be done in two modes Cash(Calculation includes VAT) totalAmount = purchaseAmount + VAT Credit Card(Calculation includes processing charge and VAT) totalAmount = purchaseAmount + VAT+ processingCharge POLYMORPHISM: concept which allows on objecct/operation to behave differently in different situations. So ? Now it is payment(processingCharge) or payment()?
  • 20. Polymorphism Polymorphism is the capability of a method to do different things based on the object that it is acting upon Following concepts demonstrate different types of polymorphism in java. 1) Method Overloading 2) Method
  • 21. Static Binding vs Dynamic Binding difference between static and dynamic binding in Java. Static binding happens at compile-time while dynamic binding happens at runtime. Binding of private, static and final methods always happen at compile time since these methods cannot be overridden. Binding of overridden methods happen at runtime. Java uses static binding for overloaded methods and dynamic binding for overridden methods.
  • 23. Abstract class & abstract Method If you declare an abstract method (discussed below) in a class then you must declare the class abstract as well. you can’t have abstract method in a non- abstract class.
  • 24. What is an interface Interface looks like class but it is not a class. An interface can have methods and variables just like the class but the methods declared in interface are by default abstract (only method signature, no body). Also, the variables declared in an interface are public, static & final by default. ** java programming language does not support multiple inheritance (we can do this through Interface)
  • 25. Interface and abstract Interface provides complete abstraction as none of its methods can have body. On the other hand, abstract class provides partial abstraction as it can have abstract and concrete(methods with body) methods both.
  • 27. Use of Interface with “abstract” keyword
  • 28. Relationship in Java classes Is A (Inheritance) Has A (Aggregation)  Tightly coupled Uses (Association)  Loosely coupled
  • 30. What next. . . . . . ORM = Object Relational Mapping ORM Providers : JPA, Hibernate, Spring, OFBiz MVC = Model View Controller MVC provider : JSF, Hibernate, Spring, OFBiz etc.
  • 31. A Strong Tool : Collection Framework To work with data in the local machine or memory must use the collection framework. Collections--> Set, List, ArrayList, Map, LinkedHashMap
  • 34. Questions & Answers  Fun with Java :)
  • 35. Thanks to all… Md. Arifur Rahman Junior Software Engineer, Newgen Technology Limited, Bangladesh.