12-22-2011, 10:16 PM
It is basically used for achieving
1.Encapsulation(or information hiding)
2.Inheritance
3.Polymorphism
Encapsulation
--The encapsulation is the inclusion within a program object of all the resources need for the object to function - basically, the methods and the data. In OOP the encapsulation is mainly achieved by creating classes, the classes expose public methods and properties. The class is kind of a container or capsule or a cell, which encapsulate the set of methods, attribute and properties to provide its indented functionalities to other classes.
Inheritance
--Ability of a new class to be created, from an existing class by extending it, is called inheritance.
Polymorphism
--Polymorphisms is a generic term that means 'many forms'. More precisely Polymorphisms means the ability of a same function exibhiting different forms based on context.The function only differes in the arguments and has the same name in all the classes where it is used.
1.Encapsulation(or information hiding)
2.Inheritance
3.Polymorphism
Encapsulation
--The encapsulation is the inclusion within a program object of all the resources need for the object to function - basically, the methods and the data. In OOP the encapsulation is mainly achieved by creating classes, the classes expose public methods and properties. The class is kind of a container or capsule or a cell, which encapsulate the set of methods, attribute and properties to provide its indented functionalities to other classes.
Inheritance
--Ability of a new class to be created, from an existing class by extending it, is called inheritance.
Polymorphism
--Polymorphisms is a generic term that means 'many forms'. More precisely Polymorphisms means the ability of a same function exibhiting different forms based on context.The function only differes in the arguments and has the same name in all the classes where it is used.