Abstraction :
Abstraction is “the process of identifying common patterns that have systematic variations;
an abstraction represents the common pattern and provides a means for specifying which variation to use”
(OR)
Abstraction is the representation of only the essential features of an object
Example Description:(Abstraction and Encapsulation)
#1 Consider an example from the programmer’s view who wants to allow the user to add items to a form/list.
The user only needs to click a button to add an item (Abstraction).
The mechanism of how the item is added to the list is not essential for him (Encapsulation)
#2 Example You r driving a car. U does not need to know the internal working of the engine or the way gear changes work,
to be able to drive the car (Encapsulation). Instead, U needs to know things such as how much turning the steering wheel
needs, etc... (Abstraction).
Abstraction is “the process of identifying common patterns that have systematic variations;
an abstraction represents the common pattern and provides a means for specifying which variation to use”
(OR)
Abstraction is the representation of only the essential features of an object
Example Description:(Abstraction and Encapsulation)
#1 Consider an example from the programmer’s view who wants to allow the user to add items to a form/list.
The user only needs to click a button to add an item (Abstraction).
The mechanism of how the item is added to the list is not essential for him (Encapsulation)
#2 Example You r driving a car. U does not need to know the internal working of the engine or the way gear changes work,
to be able to drive the car (Encapsulation). Instead, U needs to know things such as how much turning the steering wheel
needs, etc... (Abstraction).
No comments:
Post a Comment