Benefits of OO Programming

Object Oriented Programming provides a better system structure in modeling the real world. The abstract data type concept, along with its associated en¬capsulation and information hiding principles, increases software reliability and modifiability by decoupling object specification and object implementation.
Polymorphism and dynamic binding increase flexibility and reusability of code by allowing the creation of generic software com-ponents and new classes using existing code.

Polymorphism and Dynamic Binding - Comparison

1.    Everything in an OO paradigm is an object.
2.    Each object is an instance of a class.
3.    A class is the definition of methods and data, which are other objects.
4.    An object of a class encapsulates its own state (data values) but the same behavior (methods).
5.    A class may communicate with others via messages, which requests associate with required arguments. By this way, a class can ask other classes to perform actions without knowing the details of the work under those actions. This is called Information Hiding.
6.    A class may inherit another class properties. Let class A inher¬its from class B. Then, class A is a subclass of class B and, on the other way around, class B is a superclass of class A.
7.    All classes can be arranged into an inheritance hierarchy, which is a single root tree. These specifications belong to the inter¬face part of a new OOP learning environment.
8.    A class can override behaviors inherited from its superclass.
9.    More than one class may share some common interface but embed different details inside. This is called

Polymorphism, which means many forms.
Method is the way to define behavior for a class. The conceptual framework of objects is called an object model which has four essential elements:
1.    Abstraction: Revealing only necessary information to viewers.
2.    Encapsulation: The interior views of objects.
3.    Modularity: Breaking down a system to a set of cohesive and loosely-coupled modules.
4.    Hierarchy: “is a “(inheritance) and “part or (aggregation).

Polymorphism and Dynamic Binding

Polymorphism
Polymorphism is a feature that allows one interface to be used for a general class of actions. The concept of polymorphism is often ex-pressed by the phrase “one interface, multiple methods”. It basi¬cally refers to the ability of giving the same name to methods in different subclasses. The individual methods may implement simi¬lar tasks but can be differentiated by the type of arguments passed to them.
By using polymorphism different methods can be created with the same name but with different parameters.

Dynamic Binding
Dynamic binding means ,when a method is called within a program are associated with the program at runtime rather than at compile time.

Fundamental Characteristics of OOP

A  class can inherit characteristics from another class .Classes em¬body coherent and cohesive concepts. Classes can be used to create more specialized Classes via inheritance. For example, a bicycle can be specialized to a kind built by a given manufacturer.
Inheritance is the mechanism that allows the programmer to derive new classes from existing classes. The derived classes inherit the methods and data structures of the parent class. One can add new methods or override the inherited methods to make them more specific. The parent methods will not be affected because of these modifications.
For example, different kinds of bicycles like bikes can inherit the common properties from a bicycle class and can override the methods in the parent class to suit local properties. For example, some racing bikes have an extra set of gears with a lower gear ratio.

Polymorphism
Polymorphism is a feature that allows one interface to be used for a general class of actions. The concept of polymorphism is often ex-pressed by the phrase “one interface, multiple methods”. It basi¬cally refers to the ability of giving the same name to methods in different subclasses. The individual methods may implement simi¬lar tasks but can be differentiated by the type of arguments passed to them.
By using polymorphism different methods can be created with the same name but with different parameters.

Encapsulation

One of the fundamental principles of object technology is that the internals of an object are private to that object and may not be accessed or even examined from outside the object.
Encapsulation is a simple yet reasonably effective building tool. It is a way of packaging information. Encapsulation allows the pro-grammer to present clearly specified interfaces around the services they provide. The programmer can decide what should be hidden and what is intended to be visible.
Some advantages of encapsulation are:
•    Managing complexity
•    Managing change
•    Protecting data
Message    :   The communication media of objects.
Subclass    :   A class inheriting another class’s properties.
Data hiding : Protecting data by preventing direct access to it. This is done by making the data, private or pro¬tected members of a class.
Abstraction
Abstraction refers to the act of representing essential features with¬out including the background details or explanations. It is the art of concentrating on the essential thing and ignoring the non-essential things.
Classes that use the concept of data abstraction are known as “abstract data types”. Abstract data types are achieved by making certain variables and methods in a class as private. Abstraction makes an objects look either unique, similar to or different from other objects depending on viewers.
For example, people do not think of a computer as a set of thousands of individual parts. They can ignore the details of how the CPU, Monitor and Keyboard works.