Skip to main content

Object Oriented Basic Concepts

          Object Oriented Basic Concepts

Object-Orientation:

  • Its called object orientation because that contain the things related of real word.
  • A table is a object,like a cycle,a human being etc all are the objects.
  • In every day life, we uses a so many objects,and we work with model.
  • For ex. we uses a model to describe a reality.


  • The teacher drives own car as well as reads a book.


Basic Concepts of OOP:
  • Object
    • Classes
    • Encapsulation
    • Abstraction
    • Inheritances
    • Polymorphism
    • Dynamic binding
    • Messaging

    Object:

    • It is a basic run time entity.
    • It contain data and properties(methods) that can manipulate a information.
    • The object is communicate with each other and programming problem analysed.

          Example:

    • If FERRARI is a one object that contain following data and properties.


    Classes:

    • Object contain data and methods.
    • The class is contain the entire set of data and methods.
    • Objects are variable type class.
    • A class is collection of similar types.

    Example:      

      Rose, Lotus,Marigolds etc   members of the class Flowers.     
            
           Flower  Rose                             
                will create an object Rose belong to the Fruit Class.

    Encapsulation:

    • The wrapping data into a one single unit is called Encapsulation. 
    • Its most important and striking feature of class.
    • The function provide the interface between the objects data and program.This insulation of the data from direct access by the program is called Data hiding.      

    Example:

    The capsule contain all required elements in under that cover. That are in Fig.









    Abstraction:

    • Only  represent required and essential features.
    • Hides the background details or explanations.
    • They encapsulates all essentials properties f an object.     

    Example:

    The calculator solves son many equations but it no gives no extra details like how  calculates, which formula uses etc.





    Inheritance:

    • Object of one class can acquire features of another one class.
    • That's  mean the objects inherits the properties and methods from another class
    • It supports to the re-usability feature of the OOP. Because the new class can easily give a access of their old class.
    • As well as the new class allows added their own some features.
    • The old class referred as base class and  new class referred as derived class.

    Example:

    In fig the cub extends the features of Lions.




    Polymorphism:

    • Ability to take more than one form.
    • An operation may exhibits different behaviors in different instances,The behavior depends upon the types of data used in the operation.     
    • Polymorphism is extensively used in implementing inheritance.  

          Example:

    The boys plays various role in their life.      


    •  In shopping center he act as a customer.
    • In the bus as a passenger
    • In school as a student.
    • In home as a son..

    Dynamic binding:

    • It known as Run time binding or Dynamic binding.
    • Binding means link between procedure call and code to be executed.
    • At run-time, the code corresponding to the project under current reference will be called or executed.  
    • It also called late binding.

                Example:  

    Consider the procedure of boy in polymorphism  in above fig. by inheritance , every object will have this procedure. Its algorithm is unique for each object and the perform their task in each class that defines the object.

    Message passing:

    • Object oriented programming communicate with each other,message passing  is used foe communication between objects.
    • It involves following basic steps:     
    1.            Creating classes  with data , methods
    2.            Creating objects of class
    3.             Establishing commutation among them      

    •  Object  can be communicated with each other by sending and receiving wit each other.
    •   A message means its sends a request to a method to execute a code.
    • That's why a method in the receiving object that generates the desired output.   

         Example:

    Student is one object that communicated with management as well as teacher. Its shown in fig.





    Comments

    Popular posts from this blog

    Piconet and Scatternet

                                     Piconet and Scatternet         Transfer a data to various people  its become most important now a days. There are a lots of methods are available to  share to data or transfer to data.But I explain here about the Bluetooth  Piconet and Scatternet. Piconet:           Piconet gets its name fro the world "pico". Pico means a very small.         A piconet is nothing but small network. Using this network we can share the data or transfer the data .Its one ad-hoc network.Which links a wireless user group of devices,using Bluetooth  technology.         Piconet is formed at least two devices such as portable PC and a cellular phone to connect. Ad maximum 8 to need to make this network.When network is established, one device act as master and other as sa...

    Computer Virus

                                              Computer Virus Computer Virus:                    Computer virus is one program or piece of code typically affect on the system such as a corrupting file,destroy itself.    Following are the different categories of                  viruses:                     i) Boot Sector virus                    ii) Macro virus                   iii) Multipartic  virus                   iv) TSR virus                    v) Stealth virus             ...

    Deep Web

                                                   Deep Web                           The internet is known as a most important searching platform. We are use the Internet for various activities like a searching a information, listening a music,watching a various videos and all other so many activities. For that we can use a various search engine like a google,being,yahoo etc.Now-a-days google and like a other search engine makes a part of our day-to-day life.                        If you want a search a any information then most we uses a platforms like a Google,yahoo etc. This search engines is our first choice its hit in mind suddenly. This is also called "Surface web" .  But another is most important option for all this is the which give...