BLOGGER TEMPLATES AND TWITTER BACKGROUNDS »

Wednesday, December 14, 2011

Basic Concepts of Object Oriented Programming

1.Class:

Class is a frame work used to define the structure of an object and used to create new data types.

Ex:- 1.Circuit diagram for an electronic device.

2.Blue print of a house plan.

2.Object:

Object is a real world entity (or) object is a run time instance of a class.(or) Object is user defined variable of type class.

Ex:- TV,Radio,Table etc.

3.Data Hiding:

The insulation of data from direct accessing is called data hiding.That is the user cannot access the private members out the class directly.

4.Encapsulation:

Binding of data and methods with in a single unit(object) is called as encapsulation.

5.Absraction:

Absraction is an ability which shows the essential things and hides the unwanted things of an object from the user.

6.Function Overloading:

Same function name with,

Different number of arguments and

Different type of arguments

Ex:- void sum(int,int);

void sum(float,float);

void sum(int,float,int);

7.Inheritance:

Inheritance is the process of creating new class or classes from an already existing class or classes.Inheritance provides the idea of Code Reusability.

8.Polymorphism(Many forms):

Polymorphism is a technique to call multiple functions by using a same function call.(or) Polymorphism is the quality that allows one name to be used for two or more related but technically different purposes.

Example:

Function Overloading is a kind of polymorphism.

Operator Overloading is a kind of polymorphism.

0 comments: