You are on page 1of 2

Abstraction

Abstraction consists of focusing on the essential, inherent aspects of an entity and ignoring its accidental properties. In system development, it focuses only on what an object is and does, before deciding how it should be implemented. The concept of abstraction relates to the idea of hiding data that is not needed for presentation. An abstraction is a simplified view of an object that includes only features one is interested in while hides away the unnecessary details. Abstraction is the process of refining data to its essential form. Abstraction increases the power of programming language by creating user defined data types. An Abstract Data Type is defined as a data type that is defined in terms of the operations that it supports and not in terms of its structure or implementation. Abstraction represents the needed information in the program without presenting the details. In programming languages, an abstraction becomes an abstract data type or a user-defined type. In OOP, it is implemented as a class. In object-oriented programming language the programmer can abstract both data and code when needed. In object-oriented programming language, it is possible to create and provide an interface that accesses only certain elements of data types. The programmer can decide which user to give or grant access to and hide the other details. This concept is called data hiding which is similar in concept to data abstraction.

Types of Abstraction:
There are two broad types of abstraction:

Functional abstraction Data abstraction.

Functional abstraction refers to a function that can be used without taking into account how the function is implemented. In functional abstraction, access to the function is provided through a specific interface defined to invoke the function.

Data abstraction refers to the data that can be used without taking into account how the data are stored. In data abstraction, access to the data is provided through a specific set of operations defined to examine and manipulate the data. For instance, when a programmer is using standard data types, this means that users are using the concept of data abstraction. When using data types, the users are not concerned with how the data is stored but they are concerned with what operations are provided and what properties are supported.

Reasons for the need of Abstraction


Flexibility in approach: By hiding data or abstracting details that are not needed for presentation, the programmer achieves greater flexibility in approach. Enhanced Security: Abstraction gives access to data or details that are needed by users and hide the implementation details, giving enhanced security to application. Easier Replacement: With the concept of abstraction in object-oriented programming language, it is possible to replace code without recompilation. This makes the process easier and saves time for users. Modular Approach: In object-oriented programming language , the abstraction concept helps users to divide the project application into modules and test each of them separately. Then all modules are integrated and ultimately tested together. This approach makes the application development easier.

You might also like