Features
of Object Oriented Programming Language:
-
We
have 3 main features, and 8+ basic features.
1.
Encapsulation
2.
Polymorphism
3.
Inheritance
Encapsulation:
Combining
the data and the eligible code that acts upon the data into a single unit of an
organization so that they are safe from outside interface is called an
Encapsulation.
Ø It hides
the non-essential features of an object and provides access privileges only to
the essential components.
Ø It secures data by
preventing free-flow of data throughout the application.
Ø Class
represents the basis of Encapsulation, Objects implement Encapsulation.
Inheritance:
Ø A new
entity acquiring the features from the existing entities is called ‘Inheritance’.
Ø The New
Class which inherits the properties is called as ‘child class’, the existing
class which is inherited is called as ‘parent class’.
Ø The
Subclass inherits properties from Base class.
Polymorphism:
Ø ‘Poly’means
‘many’
‘morphism’means ‘forms’
Ø One
interface many forms is the Key concept of polymorphism.
Ø Polymorphism
offers extensibility of code which refers to only one method can be used to get
only one functionality but it can be executed to get other functionality.
Ø This
improves flexibility in processing and compactness in application development
is achieved.
Ø With the
help of polymorphism, we can generate multiple services of an object with a
single method, the behavior of object varies wrt context.
No comments:
Post a Comment