2
Most read
15
Most read
20
Most read
BASIC CONCEPTS OF OOPs
Presented by:
Michelle Anne Meralpis
JAVA
• Java – a high-level programming language
• Same with C, FORTRAN, Smalltalk, Perl
• Lets you write special programs called
Applets
• Java is called as an Object-Oriented
Programming Language
What is OOP?
• Software Development Technique
• Effective use of programmer productivity
• Way of creating large scale systems
• Approaching 100% solution
Basic Concepts of OOPs
• Object
• Class
• Inheritance
• Polymorphism
• Encapsulation
• Data Abstraction
Object
• A person, place or concepts
• Composed of characteristics (data) and
behavior (operation)
Example:
Class
• A blueprint or prototype from which objects
are created
• A collection of objects of similar type
Example:
Vehicle
COST=
4,000,00
COLOR=RED
Car
MH-01
1234
Example:
Inheritance
• The process by which objects of one class
can get properties of objects of another
class.
Polymorphism
• The ability to take more than one form
• Allows us to write generic, reusable code
more easily
Example:
Encapsulation
• Wrapping of data and functions into a
single unit (i.e. class)
• Information hiding
Data Abstraction
• Refers to the act of representing important
description without including the
background details or explanations
Creating Objects
Point originOne = new Point(23,94);
Rectangle rectOne = new Rectangle(originOne, 100, 200);
Rectangle rectTwo = new Rectangle(50, 100);
Each of these statements has three parts:
1. Declaration – the code set in bold are all variable declarations that
associate a variable name with an object type.
2. Instantiation – the new keyword is a Java operator that creates the object.
3. Initialization: The new operator is followed by a call to a constructor, which
initializes the new object.
Declaring Object Reference
• Previously, you learned that to declare a variable, you
write:
type name;
• You can also declare a reference variable on its own
line. For example:
Point originOne;
Instantiating a Class
• The new operator returns a reference to the object it
created. This reference is usually assigned to a variable
of the appropriate type, like:
Point originOne = new Point(23, 94);
• It can also be used directly in an expression. For
example:
int height = new Rectangle().height;
Initializing an Object
• Here's the code for the Point class:
public class Point {
public int x = 0;
public int y = 0;
//constructor
public Point(int a, int b) {
x = a;
y = b;
}
}
Initializing an Object (2)
Point originOne = new Point(23, 94);
• The result of executing this statement can be illustrated
in the next figure:
Calling an Object's Methods
• Append the method’s simple name to the object
reference using intervening dot operator (.)
• Provide arguments to the method within enclosing
parenthesis ()
objectReference.methodName(argumentList);
Or
objectReference.methodName();
Calling an Object's Methods (2)
new Rectangle(100, 50).getArea()
• As shown, you can use the dot notation to invoke the
new Rectangle’s getArea() method to compute the
area of the new rectangle.

More Related Content

ODP
OOP java
PDF
Java Basic Oops Concept
PDF
Oops concepts || Object Oriented Programming Concepts in Java
PPTX
Classes, objects in JAVA
PPT
Oops in Java
PPTX
oops concept in java | object oriented programming in java
PPT
Oop java
PPTX
Concept of OOPS with real life examples
OOP java
Java Basic Oops Concept
Oops concepts || Object Oriented Programming Concepts in Java
Classes, objects in JAVA
Oops in Java
oops concept in java | object oriented programming in java
Oop java
Concept of OOPS with real life examples

What's hot (20)

PDF
Class and Objects in Java
PPTX
Java package
PDF
Arrays in Java
PPTX
Strings in Java
PPTX
Features of java
PPTX
Polymorphism in java
PPTX
Java Data Types
PPT
Java Streams
PPTX
JAVA AWT
PPTX
Core java complete ppt(note)
PPT
Inheritance in java
PDF
Introduction to Java Programming
PPT
PPTX
Arrays in Java
PPTX
Event handling
PPTX
Introduction to java
PPTX
Interface in java
PDF
Methods in Java
PPT
Java Presentation
PPTX
String, string builder, string buffer
Class and Objects in Java
Java package
Arrays in Java
Strings in Java
Features of java
Polymorphism in java
Java Data Types
Java Streams
JAVA AWT
Core java complete ppt(note)
Inheritance in java
Introduction to Java Programming
Arrays in Java
Event handling
Introduction to java
Interface in java
Methods in Java
Java Presentation
String, string builder, string buffer
Ad

Viewers also liked (20)

PPT
Object Oriented Programming Concepts
PPT
Object Oriented Programming with Java
PPT
Basic concepts of object oriented programming
PPTX
Basics of Java
PPT
Introduction to-programming
PPT
GUI Programming In Java
PPT
Object Oriented Programming with Java
PPT
Object-oriented concepts
PPT
Java basic
PPT
Object Oriented Programming Concepts using Java
PPTX
Oops concepts
PPTX
Introduction to OO, Java and Eclipse/WebSphere
PDF
Object Oriented Concepts in Real Projects
PPS
Oops recap
PPS
Vb.net session 09
PPS
15 ooad uml-20
PPS
11 ds and algorithm session_16
PPS
Dacj 2-2 c
PPS
09 iec t1_s1_oo_ps_session_13
Object Oriented Programming Concepts
Object Oriented Programming with Java
Basic concepts of object oriented programming
Basics of Java
Introduction to-programming
GUI Programming In Java
Object Oriented Programming with Java
Object-oriented concepts
Java basic
Object Oriented Programming Concepts using Java
Oops concepts
Introduction to OO, Java and Eclipse/WebSphere
Object Oriented Concepts in Real Projects
Oops recap
Vb.net session 09
15 ooad uml-20
11 ds and algorithm session_16
Dacj 2-2 c
09 iec t1_s1_oo_ps_session_13
Ad

Similar to Basic Concepts of OOPs (Object Oriented Programming in Java) (20)

PPT
java
PPT
Java is an Object-Oriented Language
DOCX
Object Oriented Programming All Unit Notes
PPT
00-review.ppt
PPTX
UNIT - 1 Java Fundamentals, Basics of java
PPTX
UNIT I OOP AND JAVA FUNDAMENTALS CONSTRUCTOR
PPT
Basic Java Concept - Practical Oriented Methodologies
DOCX
javaopps concepts
PPTX
Android Training (Java Review)
PPTX
Object Oriented Programming Concepts
PPT
00 OOP Introduction to Java Lecture Notes.ppt
PPT
00-rewfwffwfwfwewfwwfwffeffvyu8ikview.ppt
PPT
Java: Objects and Object References
PPTX
Ch-2ppt.pptx
PPTX
Object Oriended Programming with Java
PDF
Java Progamming Paradigms, OOPS Concept, Introduction to Java, Structure of J...
PDF
Java Programming Paradigms Chapter 1
PDF
Chapter2 bag2
PPTX
review.pptx mnbmnbm,nb,n,nm,mn,mn,n,nm,
PPTX
Birasa 1
java
Java is an Object-Oriented Language
Object Oriented Programming All Unit Notes
00-review.ppt
UNIT - 1 Java Fundamentals, Basics of java
UNIT I OOP AND JAVA FUNDAMENTALS CONSTRUCTOR
Basic Java Concept - Practical Oriented Methodologies
javaopps concepts
Android Training (Java Review)
Object Oriented Programming Concepts
00 OOP Introduction to Java Lecture Notes.ppt
00-rewfwffwfwfwewfwwfwffeffvyu8ikview.ppt
Java: Objects and Object References
Ch-2ppt.pptx
Object Oriended Programming with Java
Java Progamming Paradigms, OOPS Concept, Introduction to Java, Structure of J...
Java Programming Paradigms Chapter 1
Chapter2 bag2
review.pptx mnbmnbm,nb,n,nm,mn,mn,n,nm,
Birasa 1

Recently uploaded (20)

PDF
Skin Care and Cosmetic Ingredients Dictionary ( PDFDrive ).pdf
PDF
LEARNERS WITH ADDITIONAL NEEDS ProfEd Topic
PDF
English Textual Question & Ans (12th Class).pdf
PDF
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
PDF
Hazard Identification & Risk Assessment .pdf
PDF
Journal of Dental Science - UDMY (2021).pdf
PPTX
Computer Architecture Input Output Memory.pptx
PPTX
Introduction to pro and eukaryotes and differences.pptx
PDF
BP 505 T. PHARMACEUTICAL JURISPRUDENCE (UNIT 2).pdf
PDF
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
PDF
HVAC Specification 2024 according to central public works department
PPTX
Education and Perspectives of Education.pptx
PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 2).pdf
PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
PDF
My India Quiz Book_20210205121199924.pdf
PDF
Environmental Education MCQ BD2EE - Share Source.pdf
PDF
Race Reva University – Shaping Future Leaders in Artificial Intelligence
PDF
LIFE & LIVING TRILOGY- PART (1) WHO ARE WE.pdf
PDF
Climate and Adaptation MCQs class 7 from chatgpt
PDF
Journal of Dental Science - UDMY (2020).pdf
Skin Care and Cosmetic Ingredients Dictionary ( PDFDrive ).pdf
LEARNERS WITH ADDITIONAL NEEDS ProfEd Topic
English Textual Question & Ans (12th Class).pdf
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
Hazard Identification & Risk Assessment .pdf
Journal of Dental Science - UDMY (2021).pdf
Computer Architecture Input Output Memory.pptx
Introduction to pro and eukaryotes and differences.pptx
BP 505 T. PHARMACEUTICAL JURISPRUDENCE (UNIT 2).pdf
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
HVAC Specification 2024 according to central public works department
Education and Perspectives of Education.pptx
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 2).pdf
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
My India Quiz Book_20210205121199924.pdf
Environmental Education MCQ BD2EE - Share Source.pdf
Race Reva University – Shaping Future Leaders in Artificial Intelligence
LIFE & LIVING TRILOGY- PART (1) WHO ARE WE.pdf
Climate and Adaptation MCQs class 7 from chatgpt
Journal of Dental Science - UDMY (2020).pdf

Basic Concepts of OOPs (Object Oriented Programming in Java)

  • 1. BASIC CONCEPTS OF OOPs Presented by: Michelle Anne Meralpis
  • 2. JAVA • Java – a high-level programming language • Same with C, FORTRAN, Smalltalk, Perl • Lets you write special programs called Applets • Java is called as an Object-Oriented Programming Language
  • 3. What is OOP? • Software Development Technique • Effective use of programmer productivity • Way of creating large scale systems • Approaching 100% solution
  • 4. Basic Concepts of OOPs • Object • Class • Inheritance • Polymorphism • Encapsulation • Data Abstraction
  • 5. Object • A person, place or concepts • Composed of characteristics (data) and behavior (operation)
  • 7. Class • A blueprint or prototype from which objects are created • A collection of objects of similar type
  • 10. Inheritance • The process by which objects of one class can get properties of objects of another class.
  • 11. Polymorphism • The ability to take more than one form • Allows us to write generic, reusable code more easily
  • 13. Encapsulation • Wrapping of data and functions into a single unit (i.e. class) • Information hiding
  • 14. Data Abstraction • Refers to the act of representing important description without including the background details or explanations
  • 15. Creating Objects Point originOne = new Point(23,94); Rectangle rectOne = new Rectangle(originOne, 100, 200); Rectangle rectTwo = new Rectangle(50, 100); Each of these statements has three parts: 1. Declaration – the code set in bold are all variable declarations that associate a variable name with an object type. 2. Instantiation – the new keyword is a Java operator that creates the object. 3. Initialization: The new operator is followed by a call to a constructor, which initializes the new object.
  • 16. Declaring Object Reference • Previously, you learned that to declare a variable, you write: type name; • You can also declare a reference variable on its own line. For example: Point originOne;
  • 17. Instantiating a Class • The new operator returns a reference to the object it created. This reference is usually assigned to a variable of the appropriate type, like: Point originOne = new Point(23, 94); • It can also be used directly in an expression. For example: int height = new Rectangle().height;
  • 18. Initializing an Object • Here's the code for the Point class: public class Point { public int x = 0; public int y = 0; //constructor public Point(int a, int b) { x = a; y = b; } }
  • 19. Initializing an Object (2) Point originOne = new Point(23, 94); • The result of executing this statement can be illustrated in the next figure:
  • 20. Calling an Object's Methods • Append the method’s simple name to the object reference using intervening dot operator (.) • Provide arguments to the method within enclosing parenthesis () objectReference.methodName(argumentList); Or objectReference.methodName();
  • 21. Calling an Object's Methods (2) new Rectangle(100, 50).getArea() • As shown, you can use the dot notation to invoke the new Rectangle’s getArea() method to compute the area of the new rectangle.