Monday, February 11, 2013

OOP's Concept - Introduction of OOP's concept - concept of OOP's in C++ - Basic program in OOP's

Basic OOP's Concept in C++:

                                                                             OOP's is a full form of Object Oriented Parogramming. Object Oriented Programming is programming paradigm which use objects and its interactions to design applications and computer program.Another defination of OOP's is an Object Oriented Programming is a programming which consist's mainly of object's (because object is a real world entities any thing in the world
can be shown in the form of world).
                                                      Basic Knowledge of OOP's concept is a many concept of OOP's is given bellow.

*Object.
*Class.
*Inheritance.
*Polymorphism.
*Encapsulation.
*Data Abstartion.
*Overloading.
*Message Passing.
*Dynamic Binding.
                             

Object:    

                Object  is a instance of class , that interact with each other on run time. Object is a basic unit of Object Oriented Programming.Object are identified by its unique name.An object represent a particular instance of a class
Example:
Circle obj=new Circle();  // obj represent a object

Class:  

               Class is a blue print of Object.Object is a similar properties and methods are group together to form a class.Thus a Class represent a set of individual.Objects.No memory is allocated when a class is created. Memory is allocated only when an object is created, i.e., when an instance of a class is created.
Example:
Class Circle
{
private:
member variable;
member function;
public:
member variable;
member function;


.....
......
};

Inheritance:

Inheritance is a method by which new class are created or derived from existing classes.It is a process of forming a new class from an exiting class or base class.he base class is also known as parent class or super class. The new class that is formed is called derived class. Derived class is also known as a child class or sub class.Inheritance helps in reducing the overall code size of the program, which is an important concept in object-oriented programming.


Polymorphism: 

                         Polymorphism means one name many form. Polymorphism allows routines to use variables of different types at different times. An operator or function can be given different meanings or functions. Polymorphism refers to a single function or multi-functioning operator performing in different ways.

Encapsulation:

                         Encapsulation means data bind in a capsule. Encapsulation combines data and functions into a single unit called Class. When using Data Encapsulation, data is not accessed directly; it is only accessible through the functions present inside the class. Data Encapsulation enables the important concept of data hiding possible.

Data Abstration:

                          Data Abstraction increases the power of programming language by creating user defined data types. Data Abstraction also represents the needed information in the program without presenting the details.
                                                             For example, a database system hides certain details of how data is stored and created and maintained. Similar way, C++ classes provides different methods to the outside world without giving internal detail about those methods and data.

Overloading:

                     Overloading is one type of Polymorphism. It allows an object to have different meanings, depending on its context. When an existing operator or function begins to operate on new data type, or class, it is understood to be overloaded.

Message Passing:

                              Message Passing is nothing but sending and receving of information by the objects same as people exchange information.So this in buliding systems that simulate real life.Following are the basic steps in message passing.
        

Dynamic Binding:  
                                                           Binding means connecting the function call to a function implementation. Dynamic binding is at run time where we can specify that the compilar matches a function call with the correct function defination at run  time.Virtual keyword is used if the function needs to be dynamically bounded.
                                                         
                                                                                          

1 comment:

  1. Nice posts. want to learn more about programing language, just take a tour Our Site

    ReplyDelete