際際滷

際際滷Share a Scribd company logo
Introduction

                  Concepts

                 Advantages


Rahul Rastogi
                Disadvantages   1
Rahul Rastogi   2
OBJECT
                     CLASS
                  DATA HIDING
                DATA ABSTRACTION

                DATA ENCAPSULATION

                 INHERITENCE
                POLYMORPHISM


Rahul Rastogi                        3
    Object is an identifiable entity with some characterstics and
  behaviour .
 Object represents data and its associated functions under
  single unit .
For example : ORANGE is an object . Its characterstics are
   spherical shaped , color is orange . Its behaviour is  it is
  juicy .
   While Programming , the characterstics of an object are
  represented by its data and its behaviour is represented by
  its function associated .



Rahul Rastogi                                                  4
   A Class is a group of objects that shares common
    properties and relationships .

For example : 1) Cars have been identified as objects .
   They have characterstics like  steering wheel , a motor
   ,brakes etc and their behaviour is their mobility .
2) Bird is a class but Parrot is an object .




                         Rahul Rastogi                 5
 The wrapping up of data and functions(that operate on
  the data) into a single unit is called data encapsulation .
   To access the data is provided by functions .
    These functions are called member functions in c++ .
    Data can not be accessed directly .


            Encapsulation
              implements
             Abstraction

                         Rahul Rastogi                  6
 Abstraction refers to the act of representing essential
  features without including the background details or
  explanations .
For example : SWITCH BOARD
We only press certain switches according our requirement
  . What is happening inside , how it is happening etc .
  We neednt know .
This is abstraction , we know only the essential things to
  operate on switch board without knowing the
  background details of switch board .


                       Rahul Rastogi                 7
     The relationships of classes through inheritance gives
        rise to a hierarchy.
        Inheritance is the capability of one class of things to
        inherit capabilities or properties from another class .
        Inheritance supports reusability and is transitive in
        nature .




Rahul Rastogi                                                      8
  Polymorphism is the ability for a message or data yo be
   processed in more than one form .
  Polomorphism is key to the power of oop .
  Languages that support classes but not polymorphism are
   called object-based languages . ADA is such a language .




Rahul Rastogi                                                   9
a)    Oops is closer to real life representation of the objects
     which we want to program.
b)    Hierarchical relationships can be represented using
     Inheritance.(reusability, extensability).
c)    Data can be divided as public and private.(data
     protection) .
d)    Program development becomes easy due to
     increased Modularity.(abstraction and encapsulation)




                         Rahul Rastogi                   10
i.    OOP is a high level concepts so takes more
      time to execute as many routines run behind at
      the time of execution.
 ii.   Offers less number of functions as compared
      to low level programming which interacts
      directly with hardware.
 iii. Increased burden on part of OOP developer.




Rahul Rastogi                                      11
Rahul Rastogi   12

More Related Content

Object oriented programming

  • 1. Introduction Concepts Advantages Rahul Rastogi Disadvantages 1
  • 3. OBJECT CLASS DATA HIDING DATA ABSTRACTION DATA ENCAPSULATION INHERITENCE POLYMORPHISM Rahul Rastogi 3
  • 4. Object is an identifiable entity with some characterstics and behaviour . Object represents data and its associated functions under single unit . For example : ORANGE is an object . Its characterstics are spherical shaped , color is orange . Its behaviour is it is juicy . While Programming , the characterstics of an object are represented by its data and its behaviour is represented by its function associated . Rahul Rastogi 4
  • 5. A Class is a group of objects that shares common properties and relationships . For example : 1) Cars have been identified as objects . They have characterstics like steering wheel , a motor ,brakes etc and their behaviour is their mobility . 2) Bird is a class but Parrot is an object . Rahul Rastogi 5
  • 6. The wrapping up of data and functions(that operate on the data) into a single unit is called data encapsulation . To access the data is provided by functions . These functions are called member functions in c++ . Data can not be accessed directly . Encapsulation implements Abstraction Rahul Rastogi 6
  • 7. Abstraction refers to the act of representing essential features without including the background details or explanations . For example : SWITCH BOARD We only press certain switches according our requirement . What is happening inside , how it is happening etc . We neednt know . This is abstraction , we know only the essential things to operate on switch board without knowing the background details of switch board . Rahul Rastogi 7
  • 8. The relationships of classes through inheritance gives rise to a hierarchy. Inheritance is the capability of one class of things to inherit capabilities or properties from another class . Inheritance supports reusability and is transitive in nature . Rahul Rastogi 8
  • 9. Polymorphism is the ability for a message or data yo be processed in more than one form . Polomorphism is key to the power of oop . Languages that support classes but not polymorphism are called object-based languages . ADA is such a language . Rahul Rastogi 9
  • 10. a) Oops is closer to real life representation of the objects which we want to program. b) Hierarchical relationships can be represented using Inheritance.(reusability, extensability). c) Data can be divided as public and private.(data protection) . d) Program development becomes easy due to increased Modularity.(abstraction and encapsulation) Rahul Rastogi 10
  • 11. i. OOP is a high level concepts so takes more time to execute as many routines run behind at the time of execution. ii. Offers less number of functions as compared to low level programming which interacts directly with hardware. iii. Increased burden on part of OOP developer. Rahul Rastogi 11