Introduction to Object Oriented Programming Language ( OOPS )
OOP (object oriented programming) is a methodology that provides a way of modularizing a program by creating partitioned memory area for both data and methods can be used as template for creating copies of such models (objects) on demand.
Unlike procedural programming, here in the oops programming model, programs are organized around objects and data rather than action and logic.
The main loop principles are
- Encapsulation
- InHeritance
- Polymorphism
Encapsulation:
The wrapping up of the data and methods to together is called encapsulation. for example, if
Take a class, we write the variables and methods in said the class. thus class is binding them
Together.so class is an example for encapsulation.
In-heritance:
If creates new classes from exiting classes, so that the new classes will acquire all the features of the exiting classes is called inheritance.
A good example for inheritance in nature is parents producing the children and children inheriting the qualities of the parents.
Polymorphism:
Polymorphism represents one form multiple forms. in programming, we can use a single variable to refers to objects of different types and thus, using that variable we call the methods of different objects. there a method call can perform different tasks depending on the type of the object.
No comments:
Post a Comment