Abstraction
Abstraction is one of the features of Object-oriented Programming.
Abstraction refers to, providing or displaying (showing) only necessary and essential information to the outside world (user of an object) and hiding background details.
It simply means representing only those details to the user which are of use to them, and hiding up the unnecessary portion from the user.
Abstraction provides what is necessary and encapsulates the unnecessary things to outside the world.
- It lets you focus on what the object does instead of how it does it.
- It provides you a generalized view of your classes or object by providing relevant information.
Example:
What happen when you switch ON Television? Do you know the inner details of the Television? And does this matter to you what is happening inside the Television? You don’t need to know. What you need to know is whether The Television is ON or NOT. This is abstraction. Show only the details which is matter to the user.
Webster Dictionary Meaning
- The act process of leaving out of consideration one or more properties of a complex object so as to attend to others; analysis. Thus, when the mind considers the form of a tree by itself, or the color of the leaves as separate from their size or figure, the act is called abstraction. So, also, when it considers whiteness, softness, virtue, existence, as separate from any particular objects.
- An idea or notion of an abstract, or theoretical nature; as, to fight for mere abstractions.
- A separation from worldly objects; a recluse life; as, a hermit's abstraction.
- Absence or absorption of mind; inattention to present objects.
- The taking surreptitiously for one's own use part of the property of another; purloining.
- A separation of volatile parts by the act of distillation.
More from this Section
- C++ Programming Language
C++ an Object-Oriented Programming language developed by Bjarne Stroustrup at Bell Laboratories ... - Variable
Variable is a computer programming term which refers to a named memory location (storage) ... - Data Types
Generally data types refer to the classification of various types of data that a computer ... - C# Programming
C# (pronounced “C sharp”) a programming language developed by Anders Hejlsberg (the ... - Median
Median is the point in a distribution of scores that divides the distribution precisely ...