Oop's Concept
.Net is purely object oriented Language because it strongly support four major pillars object oriented language.
four Major Pillars are : -
1) Abstraction.
2) Encapsulation
3) Inheritance
4) Polymorphism
.Net also support three minor pillars : -
1) Strongly Type Cast
2) Persistent
3) Concurrency
*** ABSTRACTION ***
four Major Pillars are : -
1) Abstraction.
2) Encapsulation
3) Inheritance
4) Polymorphism
.Net also support three minor pillars : -
1) Strongly Type Cast
2) Persistent
3) Concurrency
*** ABSTRACTION ***
In simple words “Abstraction captures only those details about an object that are relevant to the current perspective.”
In
object-oriented programming theory, abstraction involves the facility
to define objects that represent abstract “actors” that can perform
work, report on and change their state, and “communicate” with other
objects in the system. Abstraction is a concept which hide complexity.
*** ENCAPSULATION ***
Encapsulation is the ability to package data, related behavior in an object bundle and control/restrict access to them (both data and function) from other objects. It is all about packaging related stuff together and hide them from external elements .
We can see that keywords encapsulation and data hiding are used
synonymously everywhere. It should not be misunderstood that
encapsulation is all about data hiding only. When we say encapsulation,
emphasis should be on grouping or packaging or bundling related data and
behavior together.
*** INHERITANCE ***
Inheritance
can be defined as the process where one object acquires the properties
of another. With the use of inheritance the information is made
manageable in a hierarchical order
Different kinds of
objects often have a certain amount in common with each other. Mountain
bikes, road bikes, and tandem bikes, for example, all share the
characteristics of bicycles (current speed, current pedal cadence,
current gear). Yet each also defines additional features that make them
different: tandem bicycles have two seats and two sets of handlebars;
road bikes have drop handlebars; some mountain bikes have an additional
chain ring, giving them a lower gear ratio.
*** Poly-Morphism ****
Polymorphism
is the ability of an object to take on many forms. The most common use
of polymorphism in OOP occurs when a parent class reference is used to
refer to a child class object.
By using poly-morphism we can implement Method-overLoading and Method-overRiding
Comments
Post a Comment