SlideShare ist ein Scribd-Unternehmen logo
1 von 19
Object Oriented Concepts With
JAVA
Mehta Ishani
2nd M.E.(C.S.E)
Why OOP?
• Traditional Procedural-Oriented languages
– difficult to copy a function from one program and
reuse in another program because the the
function is reference the headers, global variables
and other functions.
(i.e. not well-encapsulated
as a self-contained reusable unit.)
– not suitable of high-level
abstraction for solving
real life problems.
Why OOP?
• Object-oriented programming (OOP)
languages
– class, which encapsulates both the static
attributes and dynamic behaviors (i.e. well-
encapsulated, easier to reuse)
– permit higher level of
abstraction for solving
real-life problems
Benefits of OOP
• Ease in software design
• Ease in software maintenance
• Reusable software
What is JAVA?
• programming language expressly designed for
use in the distributed environment of the
Internet
• Simple, Secure, Robust, Complete Object
Oriented and Platform Independent High level
Language.
• It is portable and Multi-thread technology
gives High performance.
JAVA
Hardware Platform
Java Platform
Software (OS) Platform
Operates and
Controls H/W
Environment
for Java
Development
JVM API
JAVA
How it Works:
JAVA
Java
Program
Virtual
Machine
Source code Bytecode
Java Compiler
Process of Compilation:
Java
Interpreter
Virtual
Machine
Real MachineBytecode
Object
• real word entity that has state and behavior
• contains data (instance variables)
representing its state, and instance methods,
which are the things it can do.
• instance of a class
Class
• Collection of objects
• template, blueprint or contract that defines
what an object’s data fields and methods will
be.
Abstraction
• Hiding internal details and showing
functionality
• In java, we use abstract class and interface to
achieve abstraction.
Encapsulation
• Binding (or wrapping) code and data together
into a single unit
• A java class
• Java bean
Inheritance
• When one object acquires all the properties
and behaviors of parent object
• provides code reusability.
• Used to achieve runtime polymorphism.
Inheritance
A
B
C
A B
C
A-1
A-2
B-1
B-2
AB
Multi-level Inheritance Multiple Inheritance
Multiple Multi-level Inheritance
Types of Inheritance:
Ploymorphism
• "Poly" means "many" and "morph" means
"form".
• When one task is performed by different
ways
Polymorphism
• same word or symbol to be interpreted
correctly in different situations based on the
context
• There are two types of polymorphism :
1.Compile-time polymorphism (Method
Overloading/Static)
2.Runtime Polymorphism (Method
Overriding/Dynamic)
Ploymorphism
Method Overloading:
having multiple methods with same name but
with different signature (number, type and
order of parameters).
Method Overriding:
When a subclass contains a method with the same
name and signature as in the super class then it is
called as method overriding.
Summery
• An object is an instance of a class.
• Using abstraction one can simulate real world objects.
• Abstraction provides advantage of code reuse
• Abstraction enables program open for extension
• Encapsulation provides the security that keeps data
and methods safe from inadvertent changes.
• Inheritance is parent-child relationship of class which is
mainly used for code reusability.
• Polymorphism definition is that Poly means many and
morphos means forms.
Object oriented concepts with java

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Basic Java Programming
Basic Java ProgrammingBasic Java Programming
Basic Java Programming
 
Object oriented programming-with_java
Object oriented programming-with_javaObject oriented programming-with_java
Object oriented programming-with_java
 
Short notes of oop with java
Short notes of oop with javaShort notes of oop with java
Short notes of oop with java
 
Cs8392 oops 5 units notes
Cs8392 oops 5 units notes Cs8392 oops 5 units notes
Cs8392 oops 5 units notes
 
OOPs Concepts - Android Programming
OOPs Concepts - Android ProgrammingOOPs Concepts - Android Programming
OOPs Concepts - Android Programming
 
Introduction to oop using java
Introduction  to oop using java Introduction  to oop using java
Introduction to oop using java
 
OBJECT ORIENTED ROGRAMMING With Question And Answer Full
OBJECT ORIENTED ROGRAMMING With Question And Answer  FullOBJECT ORIENTED ROGRAMMING With Question And Answer  Full
OBJECT ORIENTED ROGRAMMING With Question And Answer Full
 
OOP Introduction with java programming language
OOP Introduction with java programming languageOOP Introduction with java programming language
OOP Introduction with java programming language
 
java training in jaipur|java training|core java training|java training compa...
 java training in jaipur|java training|core java training|java training compa... java training in jaipur|java training|core java training|java training compa...
java training in jaipur|java training|core java training|java training compa...
 
Java training in delhi
Java training in delhiJava training in delhi
Java training in delhi
 
Oops ppt
Oops pptOops ppt
Oops ppt
 
Core Java
Core JavaCore Java
Core Java
 
Core Java
Core JavaCore Java
Core Java
 
Introduction to Java -unit-1
Introduction to Java -unit-1Introduction to Java -unit-1
Introduction to Java -unit-1
 
Practical OOP In Java
Practical OOP In JavaPractical OOP In Java
Practical OOP In Java
 
CS8392 OOP
CS8392 OOPCS8392 OOP
CS8392 OOP
 
Introduction to oop
Introduction to oopIntroduction to oop
Introduction to oop
 
Java for the Beginners
Java for the BeginnersJava for the Beginners
Java for the Beginners
 
Core Java Tutorial
Core Java TutorialCore Java Tutorial
Core Java Tutorial
 
Oops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in JavaOops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in Java
 

Ähnlich wie Object oriented concepts with java

Unit 1 Core Java for Compter Science 3rd
Unit 1 Core Java for Compter Science 3rdUnit 1 Core Java for Compter Science 3rd
Unit 1 Core Java for Compter Science 3rd
prat0ham
 
Oop by edgar lagman jr
Oop by edgar lagman jr Oop by edgar lagman jr
Oop by edgar lagman jr
Jun-jun Lagman
 
complete_referenceoverview.pdf
complete_referenceoverview.pdfcomplete_referenceoverview.pdf
complete_referenceoverview.pdf
zarinrafah
 

Ähnlich wie Object oriented concepts with java (20)

AkhileshD_Presentation_Core_Java_OOPs.pptx
AkhileshD_Presentation_Core_Java_OOPs.pptxAkhileshD_Presentation_Core_Java_OOPs.pptx
AkhileshD_Presentation_Core_Java_OOPs.pptx
 
Introduction to oop and java fundamentals
Introduction to oop and java fundamentalsIntroduction to oop and java fundamentals
Introduction to oop and java fundamentals
 
SKILLWISE - OOPS CONCEPT
SKILLWISE - OOPS CONCEPTSKILLWISE - OOPS CONCEPT
SKILLWISE - OOPS CONCEPT
 
Unit 1 Core Java for Compter Science 3rd
Unit 1 Core Java for Compter Science 3rdUnit 1 Core Java for Compter Science 3rd
Unit 1 Core Java for Compter Science 3rd
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Research paper
Research paperResearch paper
Research paper
 
U1 JAVA.pptx
U1 JAVA.pptxU1 JAVA.pptx
U1 JAVA.pptx
 
Core java
Core javaCore java
Core java
 
Introduction to OOP concepts
Introduction to OOP conceptsIntroduction to OOP concepts
Introduction to OOP concepts
 
Java_notes.ppt
Java_notes.pptJava_notes.ppt
Java_notes.ppt
 
JAVA object oriented programming (oop).ppt
JAVA object oriented programming (oop).pptJAVA object oriented programming (oop).ppt
JAVA object oriented programming (oop).ppt
 
Java OOP s concepts and buzzwords
Java OOP s concepts and buzzwordsJava OOP s concepts and buzzwords
Java OOP s concepts and buzzwords
 
Introduction to oops
Introduction to oopsIntroduction to oops
Introduction to oops
 
oop unit1.pptx
oop unit1.pptxoop unit1.pptx
oop unit1.pptx
 
Oop by edgar lagman jr
Oop by edgar lagman jr Oop by edgar lagman jr
Oop by edgar lagman jr
 
Comp102 lec 3
Comp102   lec 3Comp102   lec 3
Comp102 lec 3
 
Polyglot and functional (Devoxx Nov/2011)
Polyglot and functional (Devoxx Nov/2011)Polyglot and functional (Devoxx Nov/2011)
Polyglot and functional (Devoxx Nov/2011)
 
complete_referenceoverview.pdf
complete_referenceoverview.pdfcomplete_referenceoverview.pdf
complete_referenceoverview.pdf
 
ITT 202 PRINCIPLES OF OBJECT ORIENTED TECHNIQUE
ITT 202 PRINCIPLES OF OBJECT ORIENTED TECHNIQUEITT 202 PRINCIPLES OF OBJECT ORIENTED TECHNIQUE
ITT 202 PRINCIPLES OF OBJECT ORIENTED TECHNIQUE
 
Programming language paradigms
Programming language paradigmsProgramming language paradigms
Programming language paradigms
 

Mehr von ishmecse13

Mehr von ishmecse13 (14)

Search engine and web crawler
Search engine and web crawlerSearch engine and web crawler
Search engine and web crawler
 
Web services concepts, protocols and development
Web services concepts, protocols and developmentWeb services concepts, protocols and development
Web services concepts, protocols and development
 
Web services concepts, protocols and development
Web services concepts, protocols and developmentWeb services concepts, protocols and development
Web services concepts, protocols and development
 
Web services
Web servicesWeb services
Web services
 
Wap wml
Wap wmlWap wml
Wap wml
 
Wap architecture and wml script
Wap architecture and wml scriptWap architecture and wml script
Wap architecture and wml script
 
Solving travelling salesman problem using firefly algorithm
Solving travelling salesman problem using firefly algorithmSolving travelling salesman problem using firefly algorithm
Solving travelling salesman problem using firefly algorithm
 
Kerberos using public key cryptography
Kerberos using public key cryptographyKerberos using public key cryptography
Kerberos using public key cryptography
 
Hierarchical clustering
Hierarchical clusteringHierarchical clustering
Hierarchical clustering
 
File models and file accessing models
File models and file accessing modelsFile models and file accessing models
File models and file accessing models
 
Case study on cyber crime
Case study on cyber crimeCase study on cyber crime
Case study on cyber crime
 
Branch and bound technique
Branch and bound techniqueBranch and bound technique
Branch and bound technique
 
Branch and bound technique
Branch and bound techniqueBranch and bound technique
Branch and bound technique
 
Cyber crime and cyber laws
Cyber crime and cyber lawsCyber crime and cyber laws
Cyber crime and cyber laws
 

Kürzlich hochgeladen

AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
 

Kürzlich hochgeladen (20)

Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Vivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design SpainVivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design Spain
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 

Object oriented concepts with java

  • 1. Object Oriented Concepts With JAVA Mehta Ishani 2nd M.E.(C.S.E)
  • 2. Why OOP? • Traditional Procedural-Oriented languages – difficult to copy a function from one program and reuse in another program because the the function is reference the headers, global variables and other functions. (i.e. not well-encapsulated as a self-contained reusable unit.) – not suitable of high-level abstraction for solving real life problems.
  • 3. Why OOP? • Object-oriented programming (OOP) languages – class, which encapsulates both the static attributes and dynamic behaviors (i.e. well- encapsulated, easier to reuse) – permit higher level of abstraction for solving real-life problems
  • 4. Benefits of OOP • Ease in software design • Ease in software maintenance • Reusable software
  • 5. What is JAVA? • programming language expressly designed for use in the distributed environment of the Internet • Simple, Secure, Robust, Complete Object Oriented and Platform Independent High level Language. • It is portable and Multi-thread technology gives High performance.
  • 6. JAVA Hardware Platform Java Platform Software (OS) Platform Operates and Controls H/W Environment for Java Development JVM API
  • 8. JAVA Java Program Virtual Machine Source code Bytecode Java Compiler Process of Compilation: Java Interpreter Virtual Machine Real MachineBytecode
  • 9. Object • real word entity that has state and behavior • contains data (instance variables) representing its state, and instance methods, which are the things it can do. • instance of a class
  • 10. Class • Collection of objects • template, blueprint or contract that defines what an object’s data fields and methods will be.
  • 11. Abstraction • Hiding internal details and showing functionality • In java, we use abstract class and interface to achieve abstraction.
  • 12. Encapsulation • Binding (or wrapping) code and data together into a single unit • A java class • Java bean
  • 13. Inheritance • When one object acquires all the properties and behaviors of parent object • provides code reusability. • Used to achieve runtime polymorphism.
  • 14. Inheritance A B C A B C A-1 A-2 B-1 B-2 AB Multi-level Inheritance Multiple Inheritance Multiple Multi-level Inheritance Types of Inheritance:
  • 15. Ploymorphism • "Poly" means "many" and "morph" means "form". • When one task is performed by different ways
  • 16. Polymorphism • same word or symbol to be interpreted correctly in different situations based on the context • There are two types of polymorphism : 1.Compile-time polymorphism (Method Overloading/Static) 2.Runtime Polymorphism (Method Overriding/Dynamic)
  • 17. Ploymorphism Method Overloading: having multiple methods with same name but with different signature (number, type and order of parameters). Method Overriding: When a subclass contains a method with the same name and signature as in the super class then it is called as method overriding.
  • 18. Summery • An object is an instance of a class. • Using abstraction one can simulate real world objects. • Abstraction provides advantage of code reuse • Abstraction enables program open for extension • Encapsulation provides the security that keeps data and methods safe from inadvertent changes. • Inheritance is parent-child relationship of class which is mainly used for code reusability. • Polymorphism definition is that Poly means many and morphos means forms.