SlideShare a Scribd company logo
1 of 20
Disclaimer: This presentation is prepared by trainees of
baabtra as a part of mentoring program. This is not official
document of baabtra –Mentoring Partner
Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt .
Ltd
Typing Speed
Week Target Achieved
1 25WPM 18WPM
2 25WPM 19WPM
3 25WPM 20WPM
4 25WPM 21WPM
5 25wpm 21wpm
6 25wpm 21wpm
7 25wpm 22wpm
8 25wpm 22wpm
9 25wpm 23wpm
10 25wpm 23wpm
Object-Oriented Programming
MEENU SOMAN.P
meenusoman99@gmail.com
www.facebook.com/MEENU
SOMAN
twitter.com/username
in.linkedin.com/in/profilena
me
8943031867
What is OOP?
 Object-oriented programming (OOP)style of programming that
focuses on using objects to design and build applications.
 Think of an object as a model of the concepts,processes, or thing
in the real world that are meaningful to your application
What Are Objects?
 Software objects model reaL-world objects
- dog, bicycle, etc.
 Real-world objects have states and behaviors
-Dogs' states or properties: name, color, breed, hungry
-Dogs' behaviors or action : barking fetching
 How do Software objects implement real-world objects?
-Use variables to implement states
-Use methods to implement behaviors
 An object is a software bundle of variables and related
methods
Definition
• Class : -is the base design of objects
• Object :- is the instance of a class
• No memory is allocated when a class is created.
• Memory is allocated only when an object is created.
Constructor
 A method in a class that initialize an instance of an object
before it's used.
• The same name as the class and have no return type
 Multiple Constructors: the same name but a different number
of arguments or different typed arguments
• Method Overloading
 Java Provides default constructors.
 The special variable, this, can be used inside a method to refer
to the object instance
Example for Constructor
• Public class shape
{
private int width;
private int height;
shape(int height,int width)
{
this.width=width;
this.height=height;
}
Private int calculateArea()
{
return a*b;
}
}
Shape rectangle=new shape(20,35);
OOP FEATURES
Abstraction
Encapsulation
Polymorphism
Inheritance
Data Abstraction
 Abstraction refers to the act of representing
essential features without including the
background details or explanations.
 Since the classes use the concept of data
abstraction , they are known as the abstract
data types.
Encapsulation
 The wrapping up of data and functions into a
single unit is known as Encapsulation.
 The data is not accessible to the outside world
and only those functions which are wrapped in
the class can access it.
 This insulation of the data from direct access by
the program is called Data hiding or information
hiding.
Polymorphism
 In polymorphism refers to a programming language 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 to
define different area methods for any number of derived classes, such as
circles, rectangles and triangles. No matter what shape an object is, applying
the area method to it will return the correct results. Polymorphism is considered
to be a requirement of any true object-oriented programming language (OOPL).
Example
Public class shape
{
int calculateArea(int width,int height)
{
return width*height;
}
float calculateArea(int radius)
{
return(22/7)*radius*radius;
}
}
public class example
{
Public static void main(string args[])
{
Shape sh=new shape();
System.out.println(sh.calculateArea(10));
}
}
Inheritance
 In object-oriented programming, inheritance is the
concept that when a class of objects is define, any subclass
that is defined can inherit the definitions of one or more
general classes.
 This means for the programmer that an object in a subclass
need not carry its own definition of data and methods that
are generic to the class (or classes) of which it is a part.
 This not only speeds up program development; it also
ensures an inherent validity to the defined subclass object
Example
Public class shape
{
protected int width;
protected int height;
Int calculateArea()
{
Return x*y;
}
Public class dimensionshape extends shape
{
Private int depth;
Int calculateVolume()
{
Return width*height*depth;
}
}
End
If this presentation helped you, please visit our
page facebook.com/baabtra and like it.
Thanks in advance.
www.baabtra.com | www.massbaab.com |www.baabte.com
Contact Us
Emarald Mall (Big Bazar Building)
Mavoor Road, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550
NC Complex, Near Bus Stand
Mukkam, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550
Start up Village
Eranakulam,
Kerala, India.
Email: info@baabtra.com
IKK Road,
East Hill, Kozhikode
Kerala, India.
Ph: + 91 – 495 30 63 624
NIT-TBI,
NIT Campus, Kozhikode,
Kerala, India.

More Related Content

What's hot

Neural object classification by pattern recognition of one dimensional data ...
Neural object classification by pattern recognition of one dimensional data...Neural object classification by pattern recognition of one dimensional data...
Neural object classification by pattern recognition of one dimensional data ...naschibo
 
Object Oriented Concepts and Principles
Object Oriented Concepts and PrinciplesObject Oriented Concepts and Principles
Object Oriented Concepts and Principlesdeonpmeyer
 
C Sharp: Basic to Intermediate Part 01
C Sharp: Basic to Intermediate Part 01C Sharp: Basic to Intermediate Part 01
C Sharp: Basic to Intermediate Part 01Zafor Iqbal
 
Feature Selection - Natural Language Processing
Feature Selection - Natural Language ProcessingFeature Selection - Natural Language Processing
Feature Selection - Natural Language ProcessingAfaq Mansoor Khan
 
C# Summer course - Lecture 2
C# Summer course - Lecture 2C# Summer course - Lecture 2
C# Summer course - Lecture 2mohamedsamyali
 
Object oriented programming concept
Object oriented programming conceptObject oriented programming concept
Object oriented programming conceptPina Parmar
 
Oops concept in c++ unit 3 -topic 4
Oops concept in c++ unit 3 -topic 4Oops concept in c++ unit 3 -topic 4
Oops concept in c++ unit 3 -topic 4MOHIT TOMAR
 
C++ Object oriented concepts & programming
C++ Object oriented concepts & programmingC++ Object oriented concepts & programming
C++ Object oriented concepts & programmingnirajmandaliya
 
Object Oriented Concepts in Real Projects
Object Oriented Concepts in Real ProjectsObject Oriented Concepts in Real Projects
Object Oriented Concepts in Real ProjectsEPAM
 
Object Oriented Programming Concepts using Java
Object Oriented Programming Concepts using JavaObject Oriented Programming Concepts using Java
Object Oriented Programming Concepts using JavaGlenn Guden
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented ProgrammingHaris Bin Zahid
 

What's hot (20)

Concept of Object Oriented Programming
Concept of Object Oriented Programming Concept of Object Oriented Programming
Concept of Object Oriented Programming
 
Neural object classification by pattern recognition of one dimensional data ...
Neural object classification by pattern recognition of one dimensional data...Neural object classification by pattern recognition of one dimensional data...
Neural object classification by pattern recognition of one dimensional data ...
 
2 Object Oriented Programming
2 Object Oriented Programming2 Object Oriented Programming
2 Object Oriented Programming
 
General OOP Concepts
General OOP ConceptsGeneral OOP Concepts
General OOP Concepts
 
Object Oriented Concepts and Principles
Object Oriented Concepts and PrinciplesObject Oriented Concepts and Principles
Object Oriented Concepts and Principles
 
C Sharp: Basic to Intermediate Part 01
C Sharp: Basic to Intermediate Part 01C Sharp: Basic to Intermediate Part 01
C Sharp: Basic to Intermediate Part 01
 
Oops
OopsOops
Oops
 
Feature Selection - Natural Language Processing
Feature Selection - Natural Language ProcessingFeature Selection - Natural Language Processing
Feature Selection - Natural Language Processing
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
Methods in C#
Methods in C#Methods in C#
Methods in C#
 
C# Summer course - Lecture 2
C# Summer course - Lecture 2C# Summer course - Lecture 2
C# Summer course - Lecture 2
 
Object oriented programming concept
Object oriented programming conceptObject oriented programming concept
Object oriented programming concept
 
Oops concept in c++ unit 3 -topic 4
Oops concept in c++ unit 3 -topic 4Oops concept in c++ unit 3 -topic 4
Oops concept in c++ unit 3 -topic 4
 
concept of oops
concept of oopsconcept of oops
concept of oops
 
C++ Object oriented concepts & programming
C++ Object oriented concepts & programmingC++ Object oriented concepts & programming
C++ Object oriented concepts & programming
 
Object Oriented Concepts in Real Projects
Object Oriented Concepts in Real ProjectsObject Oriented Concepts in Real Projects
Object Oriented Concepts in Real Projects
 
Object Oriented Programming Concepts using Java
Object Oriented Programming Concepts using JavaObject Oriented Programming Concepts using Java
Object Oriented Programming Concepts using Java
 
Structures in c++
Structures in c++Structures in c++
Structures in c++
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented Programming
 
Inheritance
InheritanceInheritance
Inheritance
 

Viewers also liked

Nordic IT Security Forum 2015 Agenda
Nordic IT Security Forum 2015 AgendaNordic IT Security Forum 2015 Agenda
Nordic IT Security Forum 2015 AgendaCopperberg
 
TOP5 facts about Mobile Payments
TOP5 facts about Mobile PaymentsTOP5 facts about Mobile Payments
TOP5 facts about Mobile PaymentsCopperberg
 
Meet Nordic IT Security Advisory board, David Jacoby
Meet Nordic IT Security Advisory board, David JacobyMeet Nordic IT Security Advisory board, David Jacoby
Meet Nordic IT Security Advisory board, David JacobyCopperberg
 
I-Gaming Forum 2015 Post Event Report
I-Gaming Forum 2015 Post Event ReportI-Gaming Forum 2015 Post Event Report
I-Gaming Forum 2015 Post Event ReportCopperberg
 
Field Service Forum 2016
Field Service Forum 2016Field Service Forum 2016
Field Service Forum 2016Copperberg
 

Viewers also liked (20)

Cms
CmsCms
Cms
 
Claas diagram
Claas diagramClaas diagram
Claas diagram
 
Cpu and execution of instruction.
Cpu and execution of instruction.Cpu and execution of instruction.
Cpu and execution of instruction.
 
Nordic IT Security Forum 2015 Agenda
Nordic IT Security Forum 2015 AgendaNordic IT Security Forum 2015 Agenda
Nordic IT Security Forum 2015 Agenda
 
TOP5 facts about Mobile Payments
TOP5 facts about Mobile PaymentsTOP5 facts about Mobile Payments
TOP5 facts about Mobile Payments
 
Meet Nordic IT Security Advisory board, David Jacoby
Meet Nordic IT Security Advisory board, David JacobyMeet Nordic IT Security Advisory board, David Jacoby
Meet Nordic IT Security Advisory board, David Jacoby
 
Claas diagram
Claas diagramClaas diagram
Claas diagram
 
Database normalisation
Database normalisationDatabase normalisation
Database normalisation
 
Jvm
JvmJvm
Jvm
 
Chapter 5 transactions and dcl statements
Chapter 5  transactions and dcl statementsChapter 5  transactions and dcl statements
Chapter 5 transactions and dcl statements
 
Exeption handling
Exeption handlingExeption handling
Exeption handling
 
Database normalization
Database normalizationDatabase normalization
Database normalization
 
I-Gaming Forum 2015 Post Event Report
I-Gaming Forum 2015 Post Event ReportI-Gaming Forum 2015 Post Event Report
I-Gaming Forum 2015 Post Event Report
 
Field Service Forum 2016
Field Service Forum 2016Field Service Forum 2016
Field Service Forum 2016
 
99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love 99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love
 
Chapter 6 database normalisation
Chapter 6  database normalisationChapter 6  database normalisation
Chapter 6 database normalisation
 
Chapter 4 functions, views, indexing
Chapter 4  functions, views, indexingChapter 4  functions, views, indexing
Chapter 4 functions, views, indexing
 
LAI International | A Manufacturing Capabilities Overview
LAI International | A Manufacturing Capabilities OverviewLAI International | A Manufacturing Capabilities Overview
LAI International | A Manufacturing Capabilities Overview
 
Php sessions & cookies
Php sessions & cookiesPhp sessions & cookies
Php sessions & cookies
 
Functions using stack and heap
Functions using stack and heapFunctions using stack and heap
Functions using stack and heap
 

Similar to OOP in java

Ch.1 oop introduction, classes and objects
Ch.1 oop introduction, classes and objectsCh.1 oop introduction, classes and objects
Ch.1 oop introduction, classes and objectsITNet
 
4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPT4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPTAjay Chimmani
 
Object oriented programming in python
Object oriented programming in pythonObject oriented programming in python
Object oriented programming in pythonnitamhaske
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented ProgrammingIqra khalil
 
OOPS in java | Super and this Keyword | Memory Management in java | pacakages...
OOPS in java | Super and this Keyword | Memory Management in java | pacakages...OOPS in java | Super and this Keyword | Memory Management in java | pacakages...
OOPS in java | Super and this Keyword | Memory Management in java | pacakages...Sagar Verma
 
Synapseindia strcture of dotnet development part 1
Synapseindia strcture of dotnet development part 1Synapseindia strcture of dotnet development part 1
Synapseindia strcture of dotnet development part 1Synapseindiappsdevelopment
 
Jedi slides 2.1 object-oriented concepts
Jedi slides 2.1 object-oriented conceptsJedi slides 2.1 object-oriented concepts
Jedi slides 2.1 object-oriented conceptsMaryo Manjaruni
 
Object Oriented Programming In .Net
Object Oriented Programming In .NetObject Oriented Programming In .Net
Object Oriented Programming In .NetGreg Sohl
 
Object Oriented Programming with C#
Object Oriented Programming with C#Object Oriented Programming with C#
Object Oriented Programming with C#SyedUmairAli9
 
OOP lesson1 and Variables.pdf
OOP lesson1 and Variables.pdfOOP lesson1 and Variables.pdf
OOP lesson1 and Variables.pdfHouseMusica
 

Similar to OOP in java (20)

Oop ppt
Oop pptOop ppt
Oop ppt
 
Ch.1 oop introduction, classes and objects
Ch.1 oop introduction, classes and objectsCh.1 oop introduction, classes and objects
Ch.1 oop introduction, classes and objects
 
4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPT4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPT
 
Oops concept
Oops conceptOops concept
Oops concept
 
OOPJ.pptx
OOPJ.pptxOOPJ.pptx
OOPJ.pptx
 
Seminar
SeminarSeminar
Seminar
 
My c++
My c++My c++
My c++
 
Object oriented programming in python
Object oriented programming in pythonObject oriented programming in python
Object oriented programming in python
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented Programming
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented Programming
 
UNIT1-JAVA.pptx
UNIT1-JAVA.pptxUNIT1-JAVA.pptx
UNIT1-JAVA.pptx
 
Php oop (1)
Php oop (1)Php oop (1)
Php oop (1)
 
oopm 2.pdf
oopm 2.pdfoopm 2.pdf
oopm 2.pdf
 
OOPS in java | Super and this Keyword | Memory Management in java | pacakages...
OOPS in java | Super and this Keyword | Memory Management in java | pacakages...OOPS in java | Super and this Keyword | Memory Management in java | pacakages...
OOPS in java | Super and this Keyword | Memory Management in java | pacakages...
 
Synapseindia strcture of dotnet development part 1
Synapseindia strcture of dotnet development part 1Synapseindia strcture of dotnet development part 1
Synapseindia strcture of dotnet development part 1
 
Jedi slides 2.1 object-oriented concepts
Jedi slides 2.1 object-oriented conceptsJedi slides 2.1 object-oriented concepts
Jedi slides 2.1 object-oriented concepts
 
Object Oriented Programming In .Net
Object Oriented Programming In .NetObject Oriented Programming In .Net
Object Oriented Programming In .Net
 
Object Oriented Programming with C#
Object Oriented Programming with C#Object Oriented Programming with C#
Object Oriented Programming with C#
 
Advance oops concepts
Advance oops conceptsAdvance oops concepts
Advance oops concepts
 
OOP lesson1 and Variables.pdf
OOP lesson1 and Variables.pdfOOP lesson1 and Variables.pdf
OOP lesson1 and Variables.pdf
 

More from baabtra.com - No. 1 supplier of quality freshers

More from baabtra.com - No. 1 supplier of quality freshers (20)

Agile methodology and scrum development
Agile methodology and scrum developmentAgile methodology and scrum development
Agile methodology and scrum development
 
Best coding practices
Best coding practicesBest coding practices
Best coding practices
 
Core java - baabtra
Core java - baabtraCore java - baabtra
Core java - baabtra
 
Acquiring new skills what you should know
Acquiring new skills   what you should knowAcquiring new skills   what you should know
Acquiring new skills what you should know
 
Baabtra.com programming at school
Baabtra.com programming at schoolBaabtra.com programming at school
Baabtra.com programming at school
 
Php database connectivity
Php database connectivityPhp database connectivity
Php database connectivity
 
Chapter 3 stored procedures
Chapter 3 stored proceduresChapter 3 stored procedures
Chapter 3 stored procedures
 
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
Chapter 2  grouping,scalar and aggergate functions,joins   inner join,outer joinChapter 2  grouping,scalar and aggergate functions,joins   inner join,outer join
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Microsoft holo lens
Microsoft holo lensMicrosoft holo lens
Microsoft holo lens
 
Blue brain
Blue brainBlue brain
Blue brain
 
5g
5g5g
5g
 
Aptitude skills baabtra
Aptitude skills baabtraAptitude skills baabtra
Aptitude skills baabtra
 
Gd baabtra
Gd baabtraGd baabtra
Gd baabtra
 
Baabtra soft skills
Baabtra soft skillsBaabtra soft skills
Baabtra soft skills
 
Cell phone jammer
Cell phone jammerCell phone jammer
Cell phone jammer
 
Apple iwatches
Apple iwatchesApple iwatches
Apple iwatches
 
Driverless car
Driverless carDriverless car
Driverless car
 
Brain computer interface(neethu,bincy,sanooja)
Brain computer interface(neethu,bincy,sanooja)Brain computer interface(neethu,bincy,sanooja)
Brain computer interface(neethu,bincy,sanooja)
 

Recently uploaded

Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 

Recently uploaded (20)

Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 

OOP in java

  • 1.
  • 2. Disclaimer: This presentation is prepared by trainees of baabtra as a part of mentoring program. This is not official document of baabtra –Mentoring Partner Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt . Ltd
  • 3.
  • 4. Typing Speed Week Target Achieved 1 25WPM 18WPM 2 25WPM 19WPM 3 25WPM 20WPM 4 25WPM 21WPM 5 25wpm 21wpm 6 25wpm 21wpm 7 25wpm 22wpm 8 25wpm 22wpm 9 25wpm 23wpm 10 25wpm 23wpm
  • 6. What is OOP?  Object-oriented programming (OOP)style of programming that focuses on using objects to design and build applications.  Think of an object as a model of the concepts,processes, or thing in the real world that are meaningful to your application
  • 7. What Are Objects?  Software objects model reaL-world objects - dog, bicycle, etc.  Real-world objects have states and behaviors -Dogs' states or properties: name, color, breed, hungry -Dogs' behaviors or action : barking fetching  How do Software objects implement real-world objects? -Use variables to implement states -Use methods to implement behaviors  An object is a software bundle of variables and related methods
  • 8. Definition • Class : -is the base design of objects • Object :- is the instance of a class • No memory is allocated when a class is created. • Memory is allocated only when an object is created.
  • 9. Constructor  A method in a class that initialize an instance of an object before it's used. • The same name as the class and have no return type  Multiple Constructors: the same name but a different number of arguments or different typed arguments • Method Overloading  Java Provides default constructors.  The special variable, this, can be used inside a method to refer to the object instance
  • 10. Example for Constructor • Public class shape { private int width; private int height; shape(int height,int width) { this.width=width; this.height=height; } Private int calculateArea() { return a*b; } } Shape rectangle=new shape(20,35);
  • 12. Data Abstraction  Abstraction refers to the act of representing essential features without including the background details or explanations.  Since the classes use the concept of data abstraction , they are known as the abstract data types.
  • 13. Encapsulation  The wrapping up of data and functions into a single unit is known as Encapsulation.  The data is not accessible to the outside world and only those functions which are wrapped in the class can access it.  This insulation of the data from direct access by the program is called Data hiding or information hiding.
  • 14. Polymorphism  In polymorphism refers to a programming language 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 to define different area methods for any number of derived classes, such as circles, rectangles and triangles. No matter what shape an object is, applying the area method to it will return the correct results. Polymorphism is considered to be a requirement of any true object-oriented programming language (OOPL).
  • 15. Example Public class shape { int calculateArea(int width,int height) { return width*height; } float calculateArea(int radius) { return(22/7)*radius*radius; } } public class example { Public static void main(string args[]) { Shape sh=new shape(); System.out.println(sh.calculateArea(10)); } }
  • 16. Inheritance  In object-oriented programming, inheritance is the concept that when a class of objects is define, any subclass that is defined can inherit the definitions of one or more general classes.  This means for the programmer that an object in a subclass need not carry its own definition of data and methods that are generic to the class (or classes) of which it is a part.  This not only speeds up program development; it also ensures an inherent validity to the defined subclass object
  • 17. Example Public class shape { protected int width; protected int height; Int calculateArea() { Return x*y; } Public class dimensionshape extends shape { Private int depth; Int calculateVolume() { Return width*height*depth; } }
  • 18. End
  • 19. If this presentation helped you, please visit our page facebook.com/baabtra and like it. Thanks in advance. www.baabtra.com | www.massbaab.com |www.baabte.com
  • 20. Contact Us Emarald Mall (Big Bazar Building) Mavoor Road, Kozhikode, Kerala, India. Ph: + 91 – 495 40 25 550 NC Complex, Near Bus Stand Mukkam, Kozhikode, Kerala, India. Ph: + 91 – 495 40 25 550 Start up Village Eranakulam, Kerala, India. Email: info@baabtra.com IKK Road, East Hill, Kozhikode Kerala, India. Ph: + 91 – 495 30 63 624 NIT-TBI, NIT Campus, Kozhikode, Kerala, India.