SlideShare uma empresa Scribd logo
1 de 19
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
OOP Concepts in Java
ShanibaM
Shanibamanjara@gmail.com
www.facebook.com/shanimanjara
twitter.com/username
in.linkedin.com/in/profilename
What is OOP?
 Object-Oriented Programming is a methodology or
paradigm to design a program using classes and
objects. It simplifies the software development and
maintenance by providing some concepts:
What Are Objects?
 Object means a real world entity Such as a person.
 Objects are the basic units of object-oriented programming.
 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
 Object :- is the instance of a class
Class
• Class : -is the base design of objects
• which is a blueprint of an object
• No memory is allocated when a class is created.
• Memory is allocated only when an object is created.
Constructor
• Constructor in java is a special type of method that is used to
initialize the object.
• Java constructor is invoked at the time of object creation. It
constructs the values i.e. provides data for the object that is
why it is known as constructor.
Rules for creating java constructor
• There are basically two rules defined for the constructor.
• Constructor name must be same as its class name
• Constructor must have no explicit return type.
There are two types of constructors:
• Default constructor (no-arg constructor)
• Parameterized constructor
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;
}
}
OOP FEATURES
 Object
 Class
 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
• The ability to define a function in multiple forms is called
Polymorphism
• Polymorphism is the capability of a method to do different
things based on the object that it is acting upon.
• When one task is performed by different ways i.e. known as
polymorphism.
• For example: to draw something e.g. shape or rectangle etc.
• In java, we use method overloading and method overriding to
achieve polymorphism.
Inheritance
 When one object acquires all the properties and behaviors of
parent object i.e. known as inheritance. It provides code
reusability. It is used to achieve runtime polymorphism.
 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;
}
}
POP
In POP, program is divided into small
parts called functions.
POP follows Top Down approach
POP does not have any access
specifier
POP does not have any proper way for
hiding data so it is less secure.
Example of POP are : C, VB, FORTRAN,
Pascal.
OOP
In OOP, program is divided into parts
called objects.
OOP follows Bottom Up approach.
OOP has access specifiers named
Public, Private, Protected, etc.
OOP provides Data Hiding so
provides more security
Example of OOP are : C++, JAVA,
VB.NET, C#.NET.
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.

Mais conteúdo relacionado

Mais procurados

Fundamentals of OOP (Object Oriented Programming)
Fundamentals of OOP (Object Oriented Programming)Fundamentals of OOP (Object Oriented Programming)
Fundamentals of OOP (Object Oriented Programming)MD Sulaiman
 
Object Oriented Programming Principles
Object Oriented Programming PrinciplesObject Oriented Programming Principles
Object Oriented Programming PrinciplesAndrew Ferlitsch
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingMd. Tanvir Hossain
 
Introduction to object oriented programming
Introduction to object oriented programmingIntroduction to object oriented programming
Introduction to object oriented programmingAbzetdin Adamov
 
SKILLWISE - OOPS CONCEPT
SKILLWISE - OOPS CONCEPTSKILLWISE - OOPS CONCEPT
SKILLWISE - OOPS CONCEPTSkillwise Group
 
Introduction to oop
Introduction to oopIntroduction to oop
Introduction to oopcolleges
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programmingAmit Soni (CTFL)
 
Introduction to oops concepts
Introduction to oops conceptsIntroduction to oops concepts
Introduction to oops conceptsNilesh Dalvi
 
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
 
Introduction to oop using java
Introduction  to oop using java Introduction  to oop using java
Introduction to oop using java omeed
 
Lecture01 object oriented-programming
Lecture01 object oriented-programmingLecture01 object oriented-programming
Lecture01 object oriented-programmingHariz Mustafa
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented ProgrammingIqra khalil
 
Object Oriented Programming Concepts
Object Oriented Programming ConceptsObject Oriented Programming Concepts
Object Oriented Programming Conceptsthinkphp
 
Principles and advantages of oop ppt
Principles and advantages of oop pptPrinciples and advantages of oop ppt
Principles and advantages of oop pptdaxesh chauhan
 
OOP Unit 1 - Foundation of Object- Oriented Programming
OOP Unit 1 - Foundation of Object- Oriented ProgrammingOOP Unit 1 - Foundation of Object- Oriented Programming
OOP Unit 1 - Foundation of Object- Oriented Programmingdkpawar
 
the Concept of Object-Oriented Programming
the Concept of Object-Oriented Programmingthe Concept of Object-Oriented Programming
the Concept of Object-Oriented ProgrammingAida Ramlan II
 

Mais procurados (20)

Fundamentals of OOP (Object Oriented Programming)
Fundamentals of OOP (Object Oriented Programming)Fundamentals of OOP (Object Oriented Programming)
Fundamentals of OOP (Object Oriented Programming)
 
Object Oriented Programming Principles
Object Oriented Programming PrinciplesObject Oriented Programming Principles
Object Oriented Programming Principles
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented Programming
 
Introduction to object oriented programming
Introduction to object oriented programmingIntroduction to object oriented programming
Introduction to object oriented programming
 
OOPS Characteristics
OOPS CharacteristicsOOPS Characteristics
OOPS Characteristics
 
SKILLWISE - OOPS CONCEPT
SKILLWISE - OOPS CONCEPTSKILLWISE - OOPS CONCEPT
SKILLWISE - OOPS CONCEPT
 
Introduction to oop
Introduction to oopIntroduction to oop
Introduction to oop
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
SEMINAR
SEMINARSEMINAR
SEMINAR
 
Introduction to oops concepts
Introduction to oops conceptsIntroduction to oops concepts
Introduction to oops concepts
 
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
 
Introduction to oop using java
Introduction  to oop using java Introduction  to oop using java
Introduction to oop using java
 
Lecture01 object oriented-programming
Lecture01 object oriented-programmingLecture01 object oriented-programming
Lecture01 object oriented-programming
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented Programming
 
Object Oriented Programming Concepts
Object Oriented Programming ConceptsObject Oriented Programming Concepts
Object Oriented Programming Concepts
 
OOP
OOPOOP
OOP
 
Principles and advantages of oop ppt
Principles and advantages of oop pptPrinciples and advantages of oop ppt
Principles and advantages of oop ppt
 
OOP Unit 1 - Foundation of Object- Oriented Programming
OOP Unit 1 - Foundation of Object- Oriented ProgrammingOOP Unit 1 - Foundation of Object- Oriented Programming
OOP Unit 1 - Foundation of Object- Oriented Programming
 
the Concept of Object-Oriented Programming
the Concept of Object-Oriented Programmingthe Concept of Object-Oriented Programming
the Concept of Object-Oriented Programming
 

Destaque

Untitled Presentation
Untitled PresentationUntitled Presentation
Untitled Presentationamward2
 
Presentation blade center foundation for cloud
Presentation   blade center foundation for cloudPresentation   blade center foundation for cloud
Presentation blade center foundation for cloudsolarisyourep
 
How to uninstall constant fun from computers
How to uninstall constant fun from computersHow to uninstall constant fun from computers
How to uninstall constant fun from computersharoNaroum
 
牧羊少年奇幻之旅
牧羊少年奇幻之旅牧羊少年奇幻之旅
牧羊少年奇幻之旅Ting-An Lee
 
Big Time Sensuality Bill
Big Time Sensuality BillBig Time Sensuality Bill
Big Time Sensuality BillLynora Lawless
 
RHBC 164: Faithful: Intense Times Require Intense Prayer
RHBC 164: Faithful: Intense Times Require Intense PrayerRHBC 164: Faithful: Intense Times Require Intense Prayer
RHBC 164: Faithful: Intense Times Require Intense Prayerrhbc
 
Becerra_Ernesto_Professional_Persona _Project_Presentation
Becerra_Ernesto_Professional_Persona _Project_PresentationBecerra_Ernesto_Professional_Persona _Project_Presentation
Becerra_Ernesto_Professional_Persona _Project_PresentationErnesto Becerra
 
íntegra Atimo Videomonitoramento Veicular
íntegra Atimo Videomonitoramento Veicularíntegra Atimo Videomonitoramento Veicular
íntegra Atimo Videomonitoramento VeicularINTEGRA ISBS
 
Presentation v cloud suite 5.1 – what’s new
Presentation   v cloud suite 5.1 – what’s newPresentation   v cloud suite 5.1 – what’s new
Presentation v cloud suite 5.1 – what’s newsolarisyourep
 
Appoint Business Support & HR
Appoint Business Support & HRAppoint Business Support & HR
Appoint Business Support & HREmma Corfield
 

Destaque (18)

Untitled Presentation
Untitled PresentationUntitled Presentation
Untitled Presentation
 
resume
resumeresume
resume
 
BVV. RAVISHANKAR
BVV. RAVISHANKARBVV. RAVISHANKAR
BVV. RAVISHANKAR
 
Grammar
Grammar Grammar
Grammar
 
Presentation blade center foundation for cloud
Presentation   blade center foundation for cloudPresentation   blade center foundation for cloud
Presentation blade center foundation for cloud
 
How to uninstall constant fun from computers
How to uninstall constant fun from computersHow to uninstall constant fun from computers
How to uninstall constant fun from computers
 
牧羊少年奇幻之旅
牧羊少年奇幻之旅牧羊少年奇幻之旅
牧羊少年奇幻之旅
 
Coloring the Great Belt
Coloring the Great BeltColoring the Great Belt
Coloring the Great Belt
 
Big Time Sensuality Bill
Big Time Sensuality BillBig Time Sensuality Bill
Big Time Sensuality Bill
 
Finanziamenti giovani e donne
Finanziamenti giovani e donneFinanziamenti giovani e donne
Finanziamenti giovani e donne
 
RHBC 164: Faithful: Intense Times Require Intense Prayer
RHBC 164: Faithful: Intense Times Require Intense PrayerRHBC 164: Faithful: Intense Times Require Intense Prayer
RHBC 164: Faithful: Intense Times Require Intense Prayer
 
review 2014-2015
review 2014-2015review 2014-2015
review 2014-2015
 
Raj cv[1]
Raj   cv[1]Raj   cv[1]
Raj cv[1]
 
Becerra_Ernesto_Professional_Persona _Project_Presentation
Becerra_Ernesto_Professional_Persona _Project_PresentationBecerra_Ernesto_Professional_Persona _Project_Presentation
Becerra_Ernesto_Professional_Persona _Project_Presentation
 
íntegra Atimo Videomonitoramento Veicular
íntegra Atimo Videomonitoramento Veicularíntegra Atimo Videomonitoramento Veicular
íntegra Atimo Videomonitoramento Veicular
 
Presentation v cloud suite 5.1 – what’s new
Presentation   v cloud suite 5.1 – what’s newPresentation   v cloud suite 5.1 – what’s new
Presentation v cloud suite 5.1 – what’s new
 
Appoint Business Support & HR
Appoint Business Support & HRAppoint Business Support & HR
Appoint Business Support & HR
 
copd
copdcopd
copd
 

Semelhante a Oop ppt

Semelhante a Oop ppt (20)

OOP in java
OOP in javaOOP in java
OOP in java
 
oopm 2.pdf
oopm 2.pdfoopm 2.pdf
oopm 2.pdf
 
Object Oriented Programming Constructors & Destructors
Object Oriented Programming  Constructors &  DestructorsObject Oriented Programming  Constructors &  Destructors
Object Oriented Programming Constructors & Destructors
 
SE-IT JAVA LAB OOP CONCEPT
SE-IT JAVA LAB OOP CONCEPTSE-IT JAVA LAB OOP CONCEPT
SE-IT JAVA LAB OOP CONCEPT
 
Principles of OOPs.pptx
Principles of OOPs.pptxPrinciples of OOPs.pptx
Principles of OOPs.pptx
 
Oop concepts
Oop conceptsOop concepts
Oop concepts
 
Php oop (1)
Php oop (1)Php oop (1)
Php oop (1)
 
oop.pptx
oop.pptxoop.pptx
oop.pptx
 
PHP OOP Lecture - 01.pptx
PHP OOP Lecture - 01.pptxPHP OOP Lecture - 01.pptx
PHP OOP Lecture - 01.pptx
 
Basic concepts of oops
Basic concepts of oopsBasic concepts of oops
Basic concepts of oops
 
Object Oriented Programming All Unit Notes
Object Oriented Programming All Unit NotesObject Oriented Programming All Unit Notes
Object Oriented Programming All Unit Notes
 
OOPS_Unit_1
OOPS_Unit_1OOPS_Unit_1
OOPS_Unit_1
 
C++Day-1 Introduction.ppt
C++Day-1 Introduction.pptC++Day-1 Introduction.ppt
C++Day-1 Introduction.ppt
 
OOP-1.pptx
OOP-1.pptxOOP-1.pptx
OOP-1.pptx
 
Chapter 04 object oriented programming
Chapter 04 object oriented programmingChapter 04 object oriented programming
Chapter 04 object oriented programming
 
object oriented programing lecture 1
object oriented programing lecture 1object oriented programing lecture 1
object oriented programing lecture 1
 
4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPT4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPT
 
OBJECT ORIENTED PROGRAMMING CONCEPTS IN C++.pptx
OBJECT ORIENTED PROGRAMMING CONCEPTS IN C++.pptxOBJECT ORIENTED PROGRAMMING CONCEPTS IN C++.pptx
OBJECT ORIENTED PROGRAMMING CONCEPTS IN C++.pptx
 
Object oriented programming in python
Object oriented programming in pythonObject oriented programming in python
Object oriented programming in python
 
Object Oriented Programming Overview for the PeopleSoft Developer
Object Oriented Programming Overview for the PeopleSoft DeveloperObject Oriented Programming Overview for the PeopleSoft Developer
Object Oriented Programming Overview for the PeopleSoft Developer
 

Último

Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.MateoGardella
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 

Último (20)

Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 

Oop ppt

  • 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. OOP Concepts in Java ShanibaM Shanibamanjara@gmail.com www.facebook.com/shanimanjara twitter.com/username in.linkedin.com/in/profilename
  • 4. What is OOP?  Object-Oriented Programming is a methodology or paradigm to design a program using classes and objects. It simplifies the software development and maintenance by providing some concepts:
  • 5. What Are Objects?  Object means a real world entity Such as a person.  Objects are the basic units of object-oriented programming.  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  Object :- is the instance of a class
  • 6. Class • Class : -is the base design of objects • which is a blueprint of an object • No memory is allocated when a class is created. • Memory is allocated only when an object is created.
  • 7. Constructor • Constructor in java is a special type of method that is used to initialize the object. • Java constructor is invoked at the time of object creation. It constructs the values i.e. provides data for the object that is why it is known as constructor.
  • 8. Rules for creating java constructor • There are basically two rules defined for the constructor. • Constructor name must be same as its class name • Constructor must have no explicit return type. There are two types of constructors: • Default constructor (no-arg constructor) • Parameterized constructor
  • 9. 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; } }
  • 10. OOP FEATURES  Object  Class  Abstraction  Encapsulation  Polymorphism  Inheritance
  • 11. 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.
  • 12. 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.
  • 13. Polymorphism • The ability to define a function in multiple forms is called Polymorphism • Polymorphism is the capability of a method to do different things based on the object that it is acting upon. • When one task is performed by different ways i.e. known as polymorphism. • For example: to draw something e.g. shape or rectangle etc. • In java, we use method overloading and method overriding to achieve polymorphism.
  • 14. Inheritance  When one object acquires all the properties and behaviors of parent object i.e. known as inheritance. It provides code reusability. It is used to achieve runtime polymorphism.  This not only speeds up program development; it also ensures an inherent validity to the defined subclass object
  • 15. 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; } }
  • 16. POP In POP, program is divided into small parts called functions. POP follows Top Down approach POP does not have any access specifier POP does not have any proper way for hiding data so it is less secure. Example of POP are : C, VB, FORTRAN, Pascal. OOP In OOP, program is divided into parts called objects. OOP follows Bottom Up approach. OOP has access specifiers named Public, Private, Protected, etc. OOP provides Data Hiding so provides more security Example of OOP are : C++, JAVA, VB.NET, C#.NET.
  • 17. End
  • 18. 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
  • 19. 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.