Disclaimer: This presentation is prepared by trainees ofbaabtra as a part of mentoring program. This is not officialdocume...
Characteristics of OOPSName@abhishekmenon121989@gmail.comwww.facebook.com/Abhishek H menontwitter.com/Abhishek HMenonin.li...
Object oriented programming• is a programming paradigm that representsconcepts as “objects” that have data fieldsand assoc...
Object• which are usually instances of classes, areused to interact with one another to designapplications and computer pr...
Class• A class is an expanded concept of a datastructure: instead of holding only data, it canhold both data and functions...
Members of Class• Private: private members are accessible onlyin the class itself.• Public: public members are accessible ...
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 dataand function may be p...
Object binds together in the form of aclass..AnimalDog FishMuttBull StarGoldCat
Inheritance• Mechanism of deriving a new class from analready existing class.• 5 levels of inheritance-Single level-Multil...
Types of InheritanceBase ClassDerived ClassSingle levelMulti LevelFlowerRose IndiaWorldRajastanJaipur
Types of InheritanceBirdPigeonParrotMultipleBase ClassDerived
Types of Inheritance• Single levelClass Base{Data members and Functions;};Class Derived : Public Base{Data members and Fun...
Types of Inheritance• Multi LevelClass A{};Class B: Public A{};Class C :Public B{};Class D: Public C{};
Hierarchical InheritanceB DCAG HFE
Hybrid Inheritance• Combination of the above types ofinheritances.e.g. Hierarchical + MultipleMulti level + Multiple etc.
Polymorphism• Poly means many. Morphism means forms.• Polymorphism feature enables classes toprovide different implementat...
Overloading• Overloading– In method overloading, a method is executeddepending on the number and type of parameterspassed ...
Overriding• You can have a method in subclass overridesthe method in its super classes with the samename and signature. Ja...
Abstraction• Abstraction is simplifying complex reality bymodelling classes appropriate to the problem,and working at the ...
Abstraction• Modifiers:If you want to access a particular variable , methodor class from anywhere , then make that variabl...
Abstraction v/s Encapsulation• class person{private String name;public void main(){System.out.println(""+name);}}• Abstrac...
If this presentation helped you, please visit ourpage facebook.com/baabtra and like it.Thanks in advance.www.baabtra.com |...
Contact Us
OOPS Characteristics
Upcoming SlideShare
Loading in...5
×

OOPS Characteristics

7,778
-1

Published on

Published in: Education, Technology
0 Comments
6 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
7,778
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
177
Comments
0
Likes
6
Embeds 0
No embeds

No notes for slide

OOPS Characteristics

  1. 1. Disclaimer: This presentation is prepared by trainees ofbaabtra as a part of mentoring program. This is not officialdocument of baabtra –Mentoring PartnerBaabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt .Ltd
  2. 2. Characteristics of OOPSName@abhishekmenon121989@gmail.comwww.facebook.com/Abhishek H menontwitter.com/Abhishek HMenonin.linkedin.com/in/AbhishekH menon
  3. 3. Object oriented programming• is a programming paradigm that representsconcepts as “objects” that have data fieldsand associated procedures known asmethods.• data fields :attributes that describe objects.• methods : some procedures designed for aspecific task.
  4. 4. Object• which are usually instances of classes, areused to interact with one another to designapplications and computer programs.• An object is an instantiation of class. In termsof variables, a class would be a type, and anobject would be a variable.
  5. 5. Class• A class is an expanded concept of a datastructure: instead of holding only data, it canhold both data and functions.e.g. class class_name{access_specifier_1:member_1;access_specifier_2:member_2;………………..}
  6. 6. Members of Class• Private: private members are accessible onlyin the class itself.• Public: public members are accessible outsidethe class(anywhere).• Protected :protected members are accessiblein the same package, and in the subclasses ofthe class and inside the class.
  7. 7. Characteristics of OOPS• Data Encapsulation• Inheritance• Polymorphism• Data Abstraction
  8. 8. Encapsulation• It is the mechanism that binds the data &function in one form known as class. The dataand function may be private or public.• Encapsulation guarantees the integrity of thedata contained in the object.
  9. 9. Object binds together in the form of aclass..AnimalDog FishMuttBull StarGoldCat
  10. 10. Inheritance• Mechanism of deriving a new class from analready existing class.• 5 levels of inheritance-Single level-Multilevel-Multiple-Hierarchical-Hybrid
  11. 11. Types of InheritanceBase ClassDerived ClassSingle levelMulti LevelFlowerRose IndiaWorldRajastanJaipur
  12. 12. Types of InheritanceBirdPigeonParrotMultipleBase ClassDerived
  13. 13. Types of Inheritance• Single levelClass Base{Data members and Functions;};Class Derived : Public Base{Data members and Functions;};• MultipleClass A{};Class B{};Class C:Public A , Public B{};
  14. 14. Types of Inheritance• Multi LevelClass A{};Class B: Public A{};Class C :Public B{};Class D: Public C{};
  15. 15. Hierarchical InheritanceB DCAG HFE
  16. 16. Hybrid Inheritance• Combination of the above types ofinheritances.e.g. Hierarchical + MultipleMulti level + Multiple etc.
  17. 17. Polymorphism• Poly means many. Morphism means forms.• Polymorphism feature enables classes toprovide different implementation of methodshaving the same name.• Two types of Polymorphism– Compile time (Overloading)– Run time(Overriding)
  18. 18. Overloading• Overloading– In method overloading, a method is executeddepending on the number and type of parameterspassed to it.– When we compile the class, the compiler bindsthe appropriate method to the object based onthe method’s arguments. This is called earlybinding and this process is referred to as compiletime polymorphism
  19. 19. Overriding• You can have a method in subclass overridesthe method in its super classes with the samename and signature. Java virtual machinedetermines the proper method to call at theruntime, not at the compile time.
  20. 20. Abstraction• Abstraction is simplifying complex reality bymodelling classes appropriate to the problem,and working at the most appropriate level ofinheritance for a given aspect of the problem.• It deals with the outside view of the object.
  21. 21. Abstraction• Modifiers:If you want to access a particular variable , methodor class from anywhere , then make that variableaccessible by using public modifier.If you want to restrict a particular variable , methodor class to be accessible outside the class , useprivate modifier.
  22. 22. Abstraction v/s Encapsulation• class person{private String name;public void main(){System.out.println(""+name);}}• Abstraction means giving useful information , Encapsulation means hidingunnecessary information.
  23. 23. If this presentation helped you, please visit ourpage facebook.com/baabtra and like it.Thanks in advance.www.baabtra.com | www.massbaab.com |www.baabte.com
  24. 24. Contact Us
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×