what is abstraction in programming language

11 months ago 27
Nature

Abstraction is a fundamental concept in computer science and software development). In programming, abstraction is used to hide background details or any unnecessary implementation about the data so that users only see the required information. It is one of the most important and essential features of object-oriented programming. Through the process of abstraction, a programmer tries to ensure that the entity is named in a manner that will make sense and that it will have all the relevant aspects included and none of the extraneous ones.

Abstraction can be implemented in two ways in object-oriented programming languages: data abstraction and process abstraction. Data abstraction is the simplest form of abstraction, where the underlying characteristics or structure of data is hidden from the user. Process abstraction, on the other hand, hides the underlying implementation of a process.

Abstraction can be implemented with classes, which have private and public identifiers to limit the scope of any variable or a function. Pre-defined functions are similar to data abstraction, where their workings are kept hidden in header files/libraries. Abstraction is a design-level process, while encapsulation is an implementation process. Encapsulation tells us how exactly we can implement abstraction in the program. Abstraction pertains to only displaying the essential details to the user, whereas encapsulation pertains to tying up all the data members and associated member functions into a single.