Documente Academic
Documente Profesional
Documente Cultură
C# Corner
Progressive Web App Section Announced
Abstraction andAskEncapsulation
a Question Contribute
2 8 154.5k
Abstraction allows us to represent complex real world in simplest manner. It is process of identifying the relevant
qualities and behaviors an object should possess, in other word represent the necessary feature without representing
the back ground details. Abstraction is a process of hiding work style of an object and showing only those information
which are required to understand the object. Abstraction means putting all the variables and methods in a class which
are necessary.
Encapsulation
It is a process of hiding all the internal details of an object from the outside real world. The word Encapsulation, like
Enclosing into the capsule. It restrict client from seeing its internal view where behavior of the abstraction is
implemented. In Encapsulation, generally to hide data making it private and expose public property to access those
data from outer world. Encapsulation is a method for protecting data from unwanted access or alteration.
Encapsulation is the mechanism by which Abstraction is implemented.
Abstraction is a process. It is the act of identifying the relevant qualities and behaviors an object should possess.
Encapsulation is the mechanism by which the abstraction is implemented.
Abstraction Encapsulation
Abstraction solves the problem in the
Encapsulation solves the problem in the implementation level.
design level.
Abstraction is used for hiding the
Encapsulation is hiding the code and data into a single unit to
unwanted data and giving only relevant
protect the data from outer world.
data.
Abstraction is set focus on the object Encapsulation means hiding the internal details or mechanics
instead of how it does it. of how an object does something.
Abstraction is outer layout in terms of
Encapsulation is inner layout in terms of implementation.
design.
For Example: - Inner Implementation detail of a iPhone, how
For Example: - Outer Look of a iPhone, like
Display Screen are connect with each other using circuits
it has a display screen.
Download 100% FREE Spire O ce APIs
Jignesh Trivedi
Jignesh Trivedi is a Developer, C# Corner MVP, Microsoft MVP, Author, Blogger,eager to learn
new technologies
http://www.c-sharpcorner.com/members/jignesh-trivedi
Ask a Question
10 11.1m 5 2
2 8
Type your comment here and press Enter Key (Minimum 18 characters)
Nice Article.................
Sujeet Suman Oct 19, 2015
349 3.9k 125.9k 0 0 Reply
"Encapsulation is accomplished by using Class. - Keeping data and methods that accesses that data
into a single unit" "Abstraction is accomplished by using Interface. - Just giving the abstract
information about what it can do without specifying the back ground details"
RS Prajapati Apr 17, 2015
1425 18 5.2k 0 0 Reply
very good way.....to explain Abstraction and Encapsulation, it has closed many doubt of my mind.
Sharad Gupta Jan 17, 2015
58 19.3k 3.7m 0 0 Reply
nice
vikas kumar Oct 18, 2013
NA 0 0 0 0 Reply
awesome
ankit patel Apr 08, 2013
1428 15 916 0 0 Reply
Comment Using
0 Comments Sort by Oldest
Ask a Question
Add a comment...
LATEST BLOGS
Browse Web App With Multiple Browsers
FizzBuzz In C#
How To Get Data From List Beyond Threshold Limit Through Calmquery
Change The SharePoint List View Into JQuery News Ticker Using JS Link - CSR
Ask a Question
Philadelphia
New York
London
Delhi
Join C# Corner
A community of 2.3 million developers worldwide
Learn ASP.NET MVC Learn ASP.NET Core Learn Python Learn JavaScript Learn Xamarin
Learn Oracle More...
Home Events Consultants Jobs Career Advice Stories
About Us Contact Us Privacy Policy Terms Media Kit Sitemap Report a Bug FAQ
2017 C# Corner. All contents are copyright of their authors.