Search
MVC Online Training
Winners

Win Prizes

Social Presence
Twitter Twitter LinkedIn YouTube Google

Like us on Facebook
Advertisements
Top Articles Author
Mon, 15-Sep-2014 Authors
All Time Authors
Sourav.Kayal
39750
SheoNarayan
37300
Niladri.biswas
33350

Latest members | More ...


(Statistics delayed by 5 minutes)
Ads
 Article

What is an Abstraction?

Gurumatrix2004
Posted by under OOPS category on for Beginner level | Views : 30494 red flag
If you found plagiarised (copied) or inappropriate content,
please let us know the original source along with your correct email id (to communicate) for further action.
Rating: 4.2 out of 5
5 vote(s)
This article will discuss about the Abstraction and also we will see the difference between the Abstraction and encapsulation.

 Download source code for What is an Abstraction?


What is an Abstraction?
• Abstraction is thinking about something a certain way
• Abstraction is the representation of only the essential features of an object and hiding un essential features of an object.
• Through Abstraction all relevant data can be hide in order to reduce complexity and increase efficiency
• Abstraction is simplifying complex reality by modeling classes appropriate to the problem
• Abstraction-outer layout, used in terms of design
• Encapsulation protects abstraction.
• It taking required data and hiding the unwanted data.

In this above example abstraction shows only necessary details of car or shows only necessary details to drive a car like rear view mirror, gear, clutch, steering And hides internal detail of car like Piston, crankshaft, carburetors, gas turbines etc which is encapsulation for a car.

Abstraction shows only required data and hides unwanted data.

Difference between Encapsulation and Abstraction

1. Abstraction solves the problem in the design level 1. Encapsulation solves the problem in the implementation level
2. Abstraction is used for hiding the unwanted data and giving relevant data 2. Encapsulation means hiding the code and data in to a single unit to protect the data from outside world
3. Abstraction is a technique that helps to identify which specific information should be visible and which information should be hidden. 3. Encapsulation is the technique for packaging the information in such a way as to hide what should be hidden, and make visible what is intended to be visible.

 

In this above example abstraction shows only necessary details of car or shows only necessary details to drive a car like rear view mirror, gear, clutch, steering And hides internal detail of car like Piston, crankshaft, carburetors, gas turbines etc which is encapsulation for a car

Abstraction shows only required data and hides unwanted data .

In above example which shows encapsulated detail of a car which is not necessary to expose to outside world and make visible what is intended to be visible.

You can download the source code from the top of this article.

Page copy protected against web site content infringement by Copyscape
About the Author

Gurumatrix2004

Full Name: Gurunatha Dogi
Member Level: Starter
Member Status: Member
Member Since: 8/13/2009 12:50:13 AM
Country: India
Gurunatha Dogi
http://www.onlinebuff.com

Gurunatha Dogi, is a software engineer by education and profession. He likes c#, java, php, , asp.net, sql server and seo optimization. During free time he likes to write blogs on various technical topics and tips and tricks on search engine optimization. He likes to play guitar and cricket. Currently he is working in @Questpond one well known of e-learning firm in India.
Login to vote for this post.
Found interesting? Add this to:


Comments or Responses

Posted by: Ray.chayan on: 7/18/2010

Hi Gurunath, thanks for your nice articles on abstraction. Please tell me what are the all processes to implement abstraction in OOPS

Login to post response

Comment using Facebook(Author doesn't get notification)