SlideShare a Scribd company logo
What is
Object-Oriented Programming
⚫ Any Idea ????
Definition
⚫ Object-oriented programming (OOP) is a
programming paradigm using "objects" – data
structures consisting of data fields and methods
together with their interactions – to design
applicationsand computerprograms. Programming
techniques may include features such as data
abstraction, encapsulation, messaging, modularity,
polymorphism, and inheritance
4 Pillars of OOPS
⚫ Abstraction
⚫ Polymorphism
⚫Inheritance
⚫ Encapsulation
Abstraction
⚫ Abstraction (from the Latin abs, meaning away from
and traction meaning to draw) is the process of taking
away or removing characteristics from something in
order toreduce it toa setof essential characteristics. In
object-oriented programming, abstraction is one of
three central principles (along with encapsulation and
inheritance). Through the process of abstraction, a
programmer hides all but the relevant data about an
object in order to reduce complexity and increase
efficiency. In the sameway thatabstractionomitted
Polymorphism
⚫ polymorphism refers toa programming language's
ability to process objects differently depending on
their data type or class. More specifically, it is the
ability to redefine methods for derived classes. For
example, given a base class shape, polymorphism
enables the programmer todefinedifferent area
methods for any number of derived classes, such as
circles, rectangles and triangles. No matterwhatshape
an object is, applying the area method to it will return
thecorrect results. Polymorphism isconsidered to be a
requirement of any true object-oriented programming
language (OOPL).
Inheritance
⚫ In object-oriented programming (OOP), inheritance
is a way to compartmentalize and reuse code by
creating collectionsof attributesand behaviorscalled
objects that can be based on previously created
objects. In classical inheritance where objects are
defined byclasses, classescan inheritotherclasses.
The new classes, known as subclasses (or derived
classes), inheritattributesand behavior (i.e. previously
coded algorithms) of the pre-existing classes, which
are referred to as superclasses, ancestor classes or base
classes. The inheritance relationships of classes gives
rise toa hierarchy
Encapsulation
⚫Encapsulation means as much as shielding. Each
object-oriented object has a shield around it. Objects
can't 'see' each other. They can exchange things
though, as if theyare interconnected through a hatch.
⚫shows theconceptof theencapsulation. Itseparates
the external aspects of an object from the internal
implementation details of the object, which are
hidden from other objects. The object encapsulates
both data and the logical procedures required to
manipulate thedata.
Encapsulation Example:
Classes
⚫ In object-oriented programming, a class is a construct
that is used as a blueprint to create instances of itself –
referred to as class instances, class objects, instance
objects or simply objects. A class defines constituent
members which enable these class instances to have
state and behavior. Data field members (member
variables or instance variables) enable a class object to
maintain state. Other kinds of members, especially
methods, enable a class object's behavior
Class In Java
⚫ Classesare the fundamental building blocksof a Java
program. Youcan define an Employeeclassas follows:
⚫class Employee {
int age;
double salary;
}
⚫Byconvention, class namescapitalize the initial of
each word.
⚫Forexample: Employee, Boss, DateUtility, PostOffice,
RegularRateCalculator.
Continued
⚫This typeof naming convention is knownas Pascal
naming convention.
⚫The otherconvention, thecamel naming convention,
capitalize the initial of each word, except the first
word.
⚫Method and field names use thecamel naming
convention
Object
⚫ An object doesn't exist until an instance of the class
has been created; the class is just a definition. When
theobject is physicallycreated, space for thatobject is
allocated in RAM. It is possible to have multiple
objectscreated from oneclass.
Access Control
In Javathere are 4 typesof access types
⚫1. Private .
⚫2. public .
⚫3. default (no type )
⚫4. protected .
◆ = CAN ACCESS ◇ = NO Access

More Related Content

Similar to OOP Lesson 2.pptx

Oops concepts
Oops conceptsOops concepts
Oops concepts
Kanan Gandhi
 
Oops concepts
Oops conceptsOops concepts
Oops concepts
ACCESS Health Digital
 
JAVA-PPT'S-complete-chrome.pptx
JAVA-PPT'S-complete-chrome.pptxJAVA-PPT'S-complete-chrome.pptx
JAVA-PPT'S-complete-chrome.pptx
KunalYadav65140
 
JAVA-PPT'S.pptx
JAVA-PPT'S.pptxJAVA-PPT'S.pptx
JAVA-PPT'S.pptx
RaazIndia
 
Objects and Instances.ppt
Objects and Instances.pptObjects and Instances.ppt
Objects and Instances.ppt
IKATrainingCentre
 
PHP OOP Lecture - 01.pptx
PHP OOP Lecture - 01.pptxPHP OOP Lecture - 01.pptx
PHP OOP Lecture - 01.pptx
Atikur Rahman
 
Oops slide
Oops slide Oops slide
Oops slide
Ashok Sharma
 
Basic Concepts of Object Oriented Programming using C++
Basic Concepts of Object Oriented Programming using C++Basic Concepts of Object Oriented Programming using C++
Basic Concepts of Object Oriented Programming using C++
ShivamPathak318367
 
Encapsulation
EncapsulationEncapsulation
Encapsulation
saikat rahman
 
Introduction to Object Oriented Programming.2.ppt
Introduction to Object Oriented Programming.2.pptIntroduction to Object Oriented Programming.2.ppt
Introduction to Object Oriented Programming.2.ppt
IKATrainingCentre
 
java part 1 computer science.pptx
java part 1 computer science.pptxjava part 1 computer science.pptx
java part 1 computer science.pptx
MUHAMMED MASHAHIL PUKKUNNUMMAL
 
Principles of OOPs.pptx
Principles of OOPs.pptxPrinciples of OOPs.pptx
Principles of OOPs.pptx
LakshyaChauhan21
 
Interview preparation for programming.pptx
Interview preparation for programming.pptxInterview preparation for programming.pptx
Interview preparation for programming.pptx
BilalHussainShah5
 
Ashish oot
Ashish ootAshish oot
Ashish oot
Ashish Agrawal
 
Benefits of encapsulation
Benefits of encapsulationBenefits of encapsulation
Benefits of encapsulation
Muhammad Nawzir Khan
 
Oops
OopsOops
CPP-Unit 1.pptx
CPP-Unit 1.pptxCPP-Unit 1.pptx
CPP-Unit 1.pptx
YashKoli22
 
OOP
OOPOOP
OOSD1-unit1_1_16_09.pptx
OOSD1-unit1_1_16_09.pptxOOSD1-unit1_1_16_09.pptx
OOSD1-unit1_1_16_09.pptx
ShobhitSrivastava15887
 
Principles of oop
Principles of oopPrinciples of oop
Principles of oop
SeethaDinesh
 

Similar to OOP Lesson 2.pptx (20)

Oops concepts
Oops conceptsOops concepts
Oops concepts
 
Oops concepts
Oops conceptsOops concepts
Oops concepts
 
JAVA-PPT'S-complete-chrome.pptx
JAVA-PPT'S-complete-chrome.pptxJAVA-PPT'S-complete-chrome.pptx
JAVA-PPT'S-complete-chrome.pptx
 
JAVA-PPT'S.pptx
JAVA-PPT'S.pptxJAVA-PPT'S.pptx
JAVA-PPT'S.pptx
 
Objects and Instances.ppt
Objects and Instances.pptObjects and Instances.ppt
Objects and Instances.ppt
 
PHP OOP Lecture - 01.pptx
PHP OOP Lecture - 01.pptxPHP OOP Lecture - 01.pptx
PHP OOP Lecture - 01.pptx
 
Oops slide
Oops slide Oops slide
Oops slide
 
Basic Concepts of Object Oriented Programming using C++
Basic Concepts of Object Oriented Programming using C++Basic Concepts of Object Oriented Programming using C++
Basic Concepts of Object Oriented Programming using C++
 
Encapsulation
EncapsulationEncapsulation
Encapsulation
 
Introduction to Object Oriented Programming.2.ppt
Introduction to Object Oriented Programming.2.pptIntroduction to Object Oriented Programming.2.ppt
Introduction to Object Oriented Programming.2.ppt
 
java part 1 computer science.pptx
java part 1 computer science.pptxjava part 1 computer science.pptx
java part 1 computer science.pptx
 
Principles of OOPs.pptx
Principles of OOPs.pptxPrinciples of OOPs.pptx
Principles of OOPs.pptx
 
Interview preparation for programming.pptx
Interview preparation for programming.pptxInterview preparation for programming.pptx
Interview preparation for programming.pptx
 
Ashish oot
Ashish ootAshish oot
Ashish oot
 
Benefits of encapsulation
Benefits of encapsulationBenefits of encapsulation
Benefits of encapsulation
 
Oops
OopsOops
Oops
 
CPP-Unit 1.pptx
CPP-Unit 1.pptxCPP-Unit 1.pptx
CPP-Unit 1.pptx
 
OOP
OOPOOP
OOP
 
OOSD1-unit1_1_16_09.pptx
OOSD1-unit1_1_16_09.pptxOOSD1-unit1_1_16_09.pptx
OOSD1-unit1_1_16_09.pptx
 
Principles of oop
Principles of oopPrinciples of oop
Principles of oop
 

More from FranzLawrenzDeTorres1

enterprisearchitectureppt-181203183218.pdf
enterprisearchitectureppt-181203183218.pdfenterprisearchitectureppt-181203183218.pdf
enterprisearchitectureppt-181203183218.pdf
FranzLawrenzDeTorres1
 
finaldemo-ict10-180801142047.pdf
finaldemo-ict10-180801142047.pdffinaldemo-ict10-180801142047.pdf
finaldemo-ict10-180801142047.pdf
FranzLawrenzDeTorres1
 
functionsandformulas-131221213835-phpapp01.pdf
functionsandformulas-131221213835-phpapp01.pdffunctionsandformulas-131221213835-phpapp01.pdf
functionsandformulas-131221213835-phpapp01.pdf
FranzLawrenzDeTorres1
 
ER-and-EE-Lesson-1.pdf
ER-and-EE-Lesson-1.pdfER-and-EE-Lesson-1.pdf
ER-and-EE-Lesson-1.pdf
FranzLawrenzDeTorres1
 
JDVP-Parents-Orientation.pptx
JDVP-Parents-Orientation.pptxJDVP-Parents-Orientation.pptx
JDVP-Parents-Orientation.pptx
FranzLawrenzDeTorres1
 
Evolution of System.pptx
Evolution of System.pptxEvolution of System.pptx
Evolution of System.pptx
FranzLawrenzDeTorres1
 
ICTConcepts.ppt
ICTConcepts.pptICTConcepts.ppt
ICTConcepts.ppt
FranzLawrenzDeTorres1
 
animated-meeting-agenda-toolbox.pptx
animated-meeting-agenda-toolbox.pptxanimated-meeting-agenda-toolbox.pptx
animated-meeting-agenda-toolbox.pptx
FranzLawrenzDeTorres1
 
SIA LESSON.pptx
SIA LESSON.pptxSIA LESSON.pptx
SIA LESSON.pptx
FranzLawrenzDeTorres1
 
LESSON_8_1_NETWORK_CABLE.pptx
LESSON_8_1_NETWORK_CABLE.pptxLESSON_8_1_NETWORK_CABLE.pptx
LESSON_8_1_NETWORK_CABLE.pptx
FranzLawrenzDeTorres1
 
English-10.pptx
English-10.pptxEnglish-10.pptx
English-10.pptx
FranzLawrenzDeTorres1
 
personal-relationships11.ppsx
personal-relationships11.ppsxpersonal-relationships11.ppsx
personal-relationships11.ppsx
FranzLawrenzDeTorres1
 
Ch02.ppt
Ch02.pptCh02.ppt
chapter01-160621234231.pptx
chapter01-160621234231.pptxchapter01-160621234231.pptx
chapter01-160621234231.pptx
FranzLawrenzDeTorres1
 
bahagingfeasib-180917140000.pptx
bahagingfeasib-180917140000.pptxbahagingfeasib-180917140000.pptx
bahagingfeasib-180917140000.pptx
FranzLawrenzDeTorres1
 
INTRODUCTION TO MANAGEMENT SCIENCE.pptx
INTRODUCTION TO MANAGEMENT SCIENCE.pptxINTRODUCTION TO MANAGEMENT SCIENCE.pptx
INTRODUCTION TO MANAGEMENT SCIENCE.pptx
FranzLawrenzDeTorres1
 
trisha pangit.pptx
trisha pangit.pptxtrisha pangit.pptx
trisha pangit.pptx
FranzLawrenzDeTorres1
 
CSS.pptx
CSS.pptxCSS.pptx
bahagingpananalita-171106104815.pptx
bahagingpananalita-171106104815.pptxbahagingpananalita-171106104815.pptx
bahagingpananalita-171106104815.pptx
FranzLawrenzDeTorres1
 

More from FranzLawrenzDeTorres1 (20)

enterprisearchitectureppt-181203183218.pdf
enterprisearchitectureppt-181203183218.pdfenterprisearchitectureppt-181203183218.pdf
enterprisearchitectureppt-181203183218.pdf
 
finaldemo-ict10-180801142047.pdf
finaldemo-ict10-180801142047.pdffinaldemo-ict10-180801142047.pdf
finaldemo-ict10-180801142047.pdf
 
functionsandformulas-131221213835-phpapp01.pdf
functionsandformulas-131221213835-phpapp01.pdffunctionsandformulas-131221213835-phpapp01.pdf
functionsandformulas-131221213835-phpapp01.pdf
 
ER-and-EE-Lesson-1.pdf
ER-and-EE-Lesson-1.pdfER-and-EE-Lesson-1.pdf
ER-and-EE-Lesson-1.pdf
 
JDVP-Parents-Orientation.pptx
JDVP-Parents-Orientation.pptxJDVP-Parents-Orientation.pptx
JDVP-Parents-Orientation.pptx
 
Evolution of System.pptx
Evolution of System.pptxEvolution of System.pptx
Evolution of System.pptx
 
ICTConcepts.ppt
ICTConcepts.pptICTConcepts.ppt
ICTConcepts.ppt
 
animated-meeting-agenda-toolbox.pptx
animated-meeting-agenda-toolbox.pptxanimated-meeting-agenda-toolbox.pptx
animated-meeting-agenda-toolbox.pptx
 
SIA LESSON.pptx
SIA LESSON.pptxSIA LESSON.pptx
SIA LESSON.pptx
 
LESSON_8_1_NETWORK_CABLE.pptx
LESSON_8_1_NETWORK_CABLE.pptxLESSON_8_1_NETWORK_CABLE.pptx
LESSON_8_1_NETWORK_CABLE.pptx
 
English-10.pptx
English-10.pptxEnglish-10.pptx
English-10.pptx
 
personal-relationships11.ppsx
personal-relationships11.ppsxpersonal-relationships11.ppsx
personal-relationships11.ppsx
 
Ch02.ppt
Ch02.pptCh02.ppt
Ch02.ppt
 
chapter01-160621234231.pptx
chapter01-160621234231.pptxchapter01-160621234231.pptx
chapter01-160621234231.pptx
 
bahagingfeasib-180917140000.pptx
bahagingfeasib-180917140000.pptxbahagingfeasib-180917140000.pptx
bahagingfeasib-180917140000.pptx
 
THE CONDOM.pptx
THE CONDOM.pptxTHE CONDOM.pptx
THE CONDOM.pptx
 
INTRODUCTION TO MANAGEMENT SCIENCE.pptx
INTRODUCTION TO MANAGEMENT SCIENCE.pptxINTRODUCTION TO MANAGEMENT SCIENCE.pptx
INTRODUCTION TO MANAGEMENT SCIENCE.pptx
 
trisha pangit.pptx
trisha pangit.pptxtrisha pangit.pptx
trisha pangit.pptx
 
CSS.pptx
CSS.pptxCSS.pptx
CSS.pptx
 
bahagingpananalita-171106104815.pptx
bahagingpananalita-171106104815.pptxbahagingpananalita-171106104815.pptx
bahagingpananalita-171106104815.pptx
 

Recently uploaded

Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 

Recently uploaded (20)

Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 

OOP Lesson 2.pptx

  • 1.
  • 3. Definition ⚫ Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their interactions – to design applicationsand computerprograms. Programming techniques may include features such as data abstraction, encapsulation, messaging, modularity, polymorphism, and inheritance
  • 4. 4 Pillars of OOPS ⚫ Abstraction ⚫ Polymorphism ⚫Inheritance ⚫ Encapsulation
  • 5. Abstraction ⚫ Abstraction (from the Latin abs, meaning away from and traction meaning to draw) is the process of taking away or removing characteristics from something in order toreduce it toa setof essential characteristics. In object-oriented programming, abstraction is one of three central principles (along with encapsulation and inheritance). Through the process of abstraction, a programmer hides all but the relevant data about an object in order to reduce complexity and increase efficiency. In the sameway thatabstractionomitted
  • 6. Polymorphism ⚫ polymorphism refers toa programming language's ability to process objects differently depending on their data type or class. More specifically, it is the ability to redefine methods for derived classes. For example, given a base class shape, polymorphism enables the programmer todefinedifferent area methods for any number of derived classes, such as circles, rectangles and triangles. No matterwhatshape an object is, applying the area method to it will return thecorrect results. Polymorphism isconsidered to be a requirement of any true object-oriented programming language (OOPL).
  • 7. Inheritance ⚫ In object-oriented programming (OOP), inheritance is a way to compartmentalize and reuse code by creating collectionsof attributesand behaviorscalled objects that can be based on previously created objects. In classical inheritance where objects are defined byclasses, classescan inheritotherclasses. The new classes, known as subclasses (or derived classes), inheritattributesand behavior (i.e. previously coded algorithms) of the pre-existing classes, which are referred to as superclasses, ancestor classes or base classes. The inheritance relationships of classes gives rise toa hierarchy
  • 8. Encapsulation ⚫Encapsulation means as much as shielding. Each object-oriented object has a shield around it. Objects can't 'see' each other. They can exchange things though, as if theyare interconnected through a hatch. ⚫shows theconceptof theencapsulation. Itseparates the external aspects of an object from the internal implementation details of the object, which are hidden from other objects. The object encapsulates both data and the logical procedures required to manipulate thedata.
  • 10. Classes ⚫ In object-oriented programming, a class is a construct that is used as a blueprint to create instances of itself – referred to as class instances, class objects, instance objects or simply objects. A class defines constituent members which enable these class instances to have state and behavior. Data field members (member variables or instance variables) enable a class object to maintain state. Other kinds of members, especially methods, enable a class object's behavior
  • 11. Class In Java ⚫ Classesare the fundamental building blocksof a Java program. Youcan define an Employeeclassas follows: ⚫class Employee { int age; double salary; } ⚫Byconvention, class namescapitalize the initial of each word. ⚫Forexample: Employee, Boss, DateUtility, PostOffice, RegularRateCalculator.
  • 12. Continued ⚫This typeof naming convention is knownas Pascal naming convention. ⚫The otherconvention, thecamel naming convention, capitalize the initial of each word, except the first word. ⚫Method and field names use thecamel naming convention
  • 13. Object ⚫ An object doesn't exist until an instance of the class has been created; the class is just a definition. When theobject is physicallycreated, space for thatobject is allocated in RAM. It is possible to have multiple objectscreated from oneclass.
  • 14. Access Control In Javathere are 4 typesof access types ⚫1. Private . ⚫2. public . ⚫3. default (no type ) ⚫4. protected .
  • 15. ◆ = CAN ACCESS ◇ = NO Access