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...

    Basic Network Concepts

                               Basic Network Concept (Part 1) What is Network?  Network is two or more peoples or systems want to communicate with each other. Another  way  we can say, network is any interconnection of two or more stations that wish to communicate with each other.    2. Computer Network Computer network is connection of computers the are interconnected with each other using a single technology. In computer network not only computers are connected with each other . The resources like a printer,scanner etc.and connecting device like hub, switch also connected with each other. These interconnected device are able to the communicate with each other means share a files,folders or exchange the information.   3. Components required for Networking: For networking two types of component are required:              ...

    Dumpster Diving

                                         Dumpster Diving        Attacker does not launch their attack without any information. This information gets from targets trash.        If attacker gets the information from the targets trash is called Dumpster Diving.Its belongs to the Social Engineering.      In the dumpster diving the attacker search the small data in trash and it get very sticky information like a pin number,username,password etc,.       In computer security dumpster diving is like a dumping. That means the rubbish unwanted waste,unwanted materials etc,.           How to avoid Dumpster Diving? Avoid throwing sensitive information in the trash. Company should have some polices about to destroy trash. Company should contain trash container.