Abstraction
The literal meaning of Abstract is to Extract something. Same way, in OOPs abstraction means to extract something that is required and to leave that is not going to solve our purpose.
Instead of going in technical aspects,I will explain it from real world:
Consider a situation you are sitting in your room and reading my blog, then there may be lots of things in your room, may be your study table , laptop and many more.. In addition, each one of these components in turn has details associated with it, like: the type of material used to make the legs of the table (wood or metal), the wattage of the lightbulbs, etc. These all information are processed by our brains, but with all processing, there also an abstraction process involves which focus on recognizing and focusing on important characteristics of a situation of a Object and filtering out unwanted details.
One familiar example of an abstraction is a road map. As an abstraction, a road map represents those features of a given geographic area relevant to someone trying to navigate with the map, perhaps by car: major roads and places of interest, obstacles such as large bodies of water,etc.
Abstraction in term of software development:
As with all abstractions, we take decisions on inclusion versus elimination when building a software system, and this abstraction must be made within the context of the overall purpose and domain, or subject matter focus, of the future system.
When representing a person in a software system, for example, is their eye color important? How about their genetic profile? Salary? Hobbies? The answer is, any of these features of a person may be relevant or irrelevant, depending on whether the system to be developed is:
payroll system, patient record system for hospital management, police record tracking system and many more...
After determining the essential aspect we focus on preparing a model and it helps us to build pattern for something that we want to build.
How we achieve abstraction in java? Which concepts we use to achieve abstraction in java?
here answer is : The concept of Abstract class and Interface ( I will be writing about abstract class and interface in details in next post).
No comments:
Post a Comment