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
Characteristics of OOPS
Name
@abhishekmenon121989@gmail
.com
www.facebook.com/
Abhishek H menon
twitter.com/Abhishek H
Menon
in.linkedin.com/in/Abhishek
H menon
Object oriented programming
• is a programming paradigm that represents
concepts as “objects” that have data fields
and associated procedures known as
methods.
• data fields :attributes that describe objects.
• methods : some procedures designed for a
specific task.
Object
• which are usually instances of classes, are
used to interact with one another to design
applications and computer programs.
• An object is an instantiation of class. In terms
of variables, a class would be a type, and an
object would be a variable.
Class
• A class is an expanded concept of a data
structure: instead of holding only data, it can
hold both data and functions.
e.g. class class_name{
access_specifier_1:
member_1;
access_specifier_2:
member_2;
………………..
}
Members of Class
• Private: private members are accessible only
in the class itself.
• Public: public members are accessible outside
the class(anywhere).
• Protected :protected members are accessible
in the same package, and in the subclasses of
the class and inside the class.
Characteristics of OOPS
• Data Encapsulation
• Inheritance
• Polymorphism
• Data Abstraction
Encapsulation
• It is the mechanism that binds the data &
function in one form known as class. The data
and function may be private or public.
• Encapsulation guarantees the integrity of the
data contained in the object.
Object binds together in the form of a
class..
Animal
Dog Fish
MuttBull StarGold
Cat
Inheritance
• Mechanism of deriving a new class from an
already existing class.
• 5 levels of inheritance
-Single level
-Multilevel
-Multiple
-Hierarchical
-Hybrid
Types of Inheritance
Base Class
Derived Class
Single level
Multi Level
Flower
Rose India
World
Rajastan
Jaipur
Types of Inheritance
Bird
PigeonParrot
Multiple
Base Class
Derived
Types of Inheritance
• Single level
Class Base{
Data members and Functions;};
Class Derived : Public Base{
Data members and Functions;};
• Multiple
Class A{};
Class B{};
Class C:Public A , Public B{};
Types of Inheritance
• Multi Level
Class A{};
Class B: Public A{};
Class C :Public B{};
Class D: Public C{};
Hierarchical Inheritance
B DC
A
G HFE
Hybrid Inheritance
• Combination of the above types of
inheritances.
e.g. Hierarchical + Multiple
Multi level + Multiple etc.
Polymorphism
• Poly means many. Morphism means forms.
• Polymorphism feature enables classes to
provide different implementation of methods
having the same name.
• Two types of Polymorphism
– Compile time (Overloading)
– Run time(Overriding)
Overloading
• Overloading
– In method overloading, a method is executed
depending on the number and type of parameters
passed to it.
– When we compile the class, the compiler binds
the appropriate method to the object based on
the method’s arguments. This is called early
binding and this process is referred to as compile
time polymorphism
Overriding
• You can have a method in subclass overrides
the method in its super classes with the same
name and signature. Java virtual machine
determines the proper method to call at the
runtime, not at the compile time.
Abstraction
• Abstraction is simplifying complex reality by
modelling classes appropriate to the problem,
and working at the most appropriate level of
inheritance for a given aspect of the problem.
• It deals with the outside view of the object.
Abstraction
• Modifiers:
If you want to access a particular variable , method
or class from anywhere , then make that variable
accessible by using public modifier.
If you want to restrict a particular variable , method
or class to be accessible outside the class , use
private modifier.
Abstraction v/s Encapsulation
• class person
{
private String name;
public void main()
{
System.out.println(""+name);
}
}
• Abstraction means giving useful information , Encapsulation means hiding
unnecessary information.
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

OOPS Characteristics

  • 2.
    Disclaimer: This presentationis 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.
    Characteristics of OOPS Name @abhishekmenon121989@gmail .com www.facebook.com/ AbhishekH menon twitter.com/Abhishek H Menon in.linkedin.com/in/Abhishek H menon
  • 4.
    Object oriented programming •is a programming paradigm that represents concepts as “objects” that have data fields and associated procedures known as methods. • data fields :attributes that describe objects. • methods : some procedures designed for a specific task.
  • 5.
    Object • which areusually instances of classes, are used to interact with one another to design applications and computer programs. • An object is an instantiation of class. In terms of variables, a class would be a type, and an object would be a variable.
  • 6.
    Class • A classis an expanded concept of a data structure: instead of holding only data, it can hold both data and functions. e.g. class class_name{ access_specifier_1: member_1; access_specifier_2: member_2; ……………….. }
  • 7.
    Members of Class •Private: private members are accessible only in the class itself. • Public: public members are accessible outside the class(anywhere). • Protected :protected members are accessible in the same package, and in the subclasses of the class and inside the class.
  • 8.
    Characteristics of OOPS •Data Encapsulation • Inheritance • Polymorphism • Data Abstraction
  • 9.
    Encapsulation • It isthe mechanism that binds the data & function in one form known as class. The data and function may be private or public. • Encapsulation guarantees the integrity of the data contained in the object.
  • 10.
    Object binds togetherin the form of a class.. Animal Dog Fish MuttBull StarGold Cat
  • 11.
    Inheritance • Mechanism ofderiving a new class from an already existing class. • 5 levels of inheritance -Single level -Multilevel -Multiple -Hierarchical -Hybrid
  • 12.
    Types of Inheritance BaseClass Derived Class Single level Multi Level Flower Rose India World Rajastan Jaipur
  • 13.
  • 14.
    Types of Inheritance •Single level Class Base{ Data members and Functions;}; Class Derived : Public Base{ Data members and Functions;}; • Multiple Class A{}; Class B{}; Class C:Public A , Public B{};
  • 15.
    Types of Inheritance •Multi Level Class A{}; Class B: Public A{}; Class C :Public B{}; Class D: Public C{};
  • 16.
  • 17.
    Hybrid Inheritance • Combinationof the above types of inheritances. e.g. Hierarchical + Multiple Multi level + Multiple etc.
  • 18.
    Polymorphism • Poly meansmany. Morphism means forms. • Polymorphism feature enables classes to provide different implementation of methods having the same name. • Two types of Polymorphism – Compile time (Overloading) – Run time(Overriding)
  • 19.
    Overloading • Overloading – Inmethod overloading, a method is executed depending on the number and type of parameters passed to it. – When we compile the class, the compiler binds the appropriate method to the object based on the method’s arguments. This is called early binding and this process is referred to as compile time polymorphism
  • 20.
    Overriding • You canhave a method in subclass overrides the method in its super classes with the same name and signature. Java virtual machine determines the proper method to call at the runtime, not at the compile time.
  • 21.
    Abstraction • Abstraction issimplifying complex reality by modelling classes appropriate to the problem, and working at the most appropriate level of inheritance for a given aspect of the problem. • It deals with the outside view of the object.
  • 22.
    Abstraction • Modifiers: If youwant to access a particular variable , method or class from anywhere , then make that variable accessible by using public modifier. If you want to restrict a particular variable , method or class to be accessible outside the class , use private modifier.
  • 23.
    Abstraction v/s Encapsulation •class person { private String name; public void main() { System.out.println(""+name); } } • Abstraction means giving useful information , Encapsulation means hiding unnecessary information.
  • 24.
    If this presentationhelped you, please visit our page facebook.com/baabtra and like it. Thanks in advance. www.baabtra.com | www.massbaab.com |www.baabte.com
  • 25.