Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Ashish oot

546 views

Published on

Published in: Technology
  • Be the first to comment

Ashish oot

  1. 1. OBJECT ORIENTED PROGRAMMING Presented By- Ashish Agrawal
  2. 2. Contents:-  Introduction to OOP  Basic elements  OOP features  Polymorphism  Inheritance  Encapsulation  Information hiding
  3. 3. Introduction to OOP-  Collection of interacting objects.  Usually contain different type of objects each type corresponding to a particular kind of data.  Organizes a program around it’s data(object) & a set of well defined interfaces to that data.  Describes the structure of a system in terms of objects & relationaships.
  4. 4. Three basic elements of OOP-  Objects  Methods or Actions  classes
  5. 5. Objects-  A main identity or idea.  Independent with a distinct role or responsibility.  an instance of a class.  an employee which is real world entity we can make an object of it and then utilize it in a program with its behaviors and actions.  All objects are distinguishable.
  6. 6. Methods or Actions-  Associated with the object.  Depends on application.  method is a subroutine (or procedure) associated with a class.  At runtime, they have access to data stored in an instance of the class.
  7. 7. Class-  Contain objects with similar attributes.  Define the type of their instances.  Represents a noun, such as a person, place or thing, or something nominalized.  We can create any no. of objects belonging to that class.  Example-Person, process ,company are classes etc..
  8. 8. OOP features-
  9. 9. Polymorphism-  Derive from Greek language & it means “many forms”.  One interface ,many methods.  Ability to create a variable, a function, or an object that has more than one form.  Example-in a method of build(),we can make square, rectangle , circle etc..
  10. 10. Polymorphism-
  11. 11. Inheritance-  One object require the properties of another.  Properties transferred from super class to subclass.  Support the concept of hierarchical classification.  Sharing of operation & actions between objects.
  12. 12. Inheritance-
  13. 13. Encapsulation-  Binds the data & the actions in one classor container.  mechanism for restricting access to some of the object’s components.  Protective text wrapper that prevents the code & data from being accessed by other code outside the wrapper.
  14. 14. Encapsulation-
  15. 15. Information Hiding-  ability to prevent certain aspects of a class or software component from being accessible to its clients.  protecting other parts of the program from extensive modification if the design decision is changed.
  16. 16. Thank You

×