OOP
OOP stands for object oriented paradigm. Were paradigm is
nothing but is the act of organizing the principles of a program.
Many programming approaches were tried like procedural
programming, modular programming, structural programming etc but OOP has proved
to be the solution of all the problems of the programming world.
Lacunas of all these programming approaches were
·
Algorithm based and second priority to data.
·
Frustrating and slow while debugging or even while
programming
·
Modification in datatype used ha
to be given to the blocks in the entire scope of the datatype
·
Real world model is missing
All these lacunas have been overcome
by the OOP.
OOP’s Programming
Solves a problem in terms of objects
and classes involved.
object
Objects are an identifiable entity
with behavior and characteristics. Just like the real world
were every object has a specific behavior and characteristics. Just like a boy he has got some
characteristics like height, weight, colour etc and
behavior like studius, talkative, fast runner etc. So
in OOP’s these behavior and characteristics are taken into consideration and
not simply his movements like moving, circling, stopping etc.
Class
A class is a collection of objects of similar properties
and relations. All animals are objects but these animals are classified under
common names like mammals, amphibians, birds etc. These classifications are
nothing but these are classes. All animals in a class have same features and
characteristics in OOP style all objects in a class have same features and
characteristics .Thus OOP models the real world.
Advantages of OOP’s over other programming approachs
· Data is given the topmost priority
· Models real world
· Contains classes and objects so debugging is easy and fast because a wrong
object can besimply modified and the change is
automatically propagated to the entire program.
· Programming is easier and fast