OOP(Object Oriented Programing) is a methodology that provides a way of modularizing a program by creating partiotioned memory area for both data and methods that can be used as template for creating copies of such modules (objects) on demand.
Unlike procedural programing, here in the OOP programing model , Programs are organised arround objects and data rather than action and logic.
The main OOPs principals are
Encapsulation
Inheritance
Plymorphism.
Unlike procedural programing, here in the OOP programing model , Programs are organised arround objects and data rather than action and logic.
The main OOPs principals are
Encapsulation
Inheritance
Plymorphism.
Encapsulation :
The wrapping up of data and methods together is called encapsulation.
For example ,
If we take a class ,we write the variables and methods inside the class.Thus class is binding them together.
So class is an example for encapsulation
So class is an example for encapsulation
Inheritance :
It creates new classes from existing classes,So that the new class will acquire all the features of the existing classes is called inheriance.
A good example for Inheritance in nature is parents producing the childern and children inheritang the qualities of the parents.
Plymorphism :
Plymorphism represents the one form in multiple forms. In programing ,we can use a single variable to refer to objects different types and thus ,using that variable we call the methods of different objects thus a method call can perform different tasks depending on the type of the object.
No comments:
Post a Comment