Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Abstraction is a key phenomenon in OOP
The class itself is already an abstraction of something, when I create the Product class, it is an abstraction of some objects of my system, which distinguishes them from the entire internal world of the system at least by the name (and then by the interface and behavior described in class).
But the key to abstraction is the interface, it is in every class (public and private), but since the class already has a description of the behavior and the object, it is difficult to separate such an abstraction, so we came up with the interface design - an abstraction in its purest form. We simply pass an abstract convention and everyone who knows how to work with it works with those objects that implement this interface. This is polymorphism.
We can also abstract some functionality from binding to a specific type. And create a functional over an abstract (generic) type - generics (parametric polymorphism).
Inheritance, encapsulation, and polymorphism are key ways to create abstraction.
See more about encapsulation here .
Abstraction is a distraction in the process of cognition from non-essential aspects, properties, relations of an object (object or phenomenon) in order to highlight their essential, regular features. The result of abstraction is abstract concepts, for example: color, curvature, beauty, etc.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question