Wednesday, August 12, 2015

Object oriented programming


         Oop is a programming language that is based on object orientation methodology. The major advantages of oops is its capabilities for creating flexible, modular programs and its ability of reusable codes.

Basics of oop


Some of the buzzwords in oop are

  1.                 Objects
  2.                 Classes
  3.                 Encapsulation
  4.                 Abstraction
  5.                Inheritance
  6.               Polymorphism
  7.               Dynamic binding


Object:

          An object is anything that really exists in the world and can be distinguished from others.
Everything that we can see physically will come into this definition, for example every human being, a book, a tree a student, a car and so no.

Class:

         A group of objects exhibiting same behavior (properties and actions) will come under the same group called a class. A class represents a group name gives to several objects. For example take the dogs: A B C D

Encapsulation:

                     One of the fundamental principles of object technology is that the internals of objects are private to that objects and may not be accessed or even examined from outside the object.

Abstraction:

                Principle: Tell me not what you are; tell me what you can do for me.

                Abstraction refers to the act of representing important features without including the background details or explanations.

Inheritance

                Inheritance is the property of oop that allows objects to be built from other objects.

                Inheritance allow explicitly when constructing new classes. Inheritance is a relationship between classes the parent class of anther (derived) class.

Types of Inheritance:

  • Single Inheritance: it represents a derived class with only one base class.
  • Multiple Inheritance: it represents a derived class with more than one base class.
  • Hierarchical Inheritance: The traits of one class with may be inherited by more than one class.
  • Multilevel: The process mechanism of deriving a class from another derived class is referred to as multilevel inheritance.
  • Hybrid: It represents the combination of multiple, multilevel inheritance.
Polymorphism:

                      Polymorphism allows a single name to be used for more than one related purpose, which are technically different.

                     Also it permits the programmer to generate high level reusable components that can be tailored to fit different applications, by changing their low level parts

the same operation may behave differently on different classes.

Dynmic Binding:

                       It means when a method is called within a program are associated with the program at runtime rather than at compile time  

                       When the overloaded operations/functions are linked during the compile time, it is called early binding or static linking, which is otherwise called as compile time polymorphism.


Waiting For Complete Object oriented programming Concept with program and multiple languges

No comments:

Post a Comment

Swift Start Here