Abstraction and its importance

Abstraction and its importance

Abstraction can be defined as the process of hiding unnecessary details to reduce the complexities of understanding a system. It involves describing things using only the relevant details for the task being carried out. Abstraction makes difficult things easier to understand and shows only the essential details without including unnecessary background information.

A layer of abstraction is added on top of complex systems to make it easier to understand and more meaningful in real world. Without abstraction most things do not make any sense to us. For example, we open and use an application on our phone by looking at its name and logo which makes perfect sense to us, but in reality it is a software program designed to perform a specific function and involves lots of code libraries, activities, and services. All these things are hidden from our view and only things that are relevant for our use and that make sense to us are shown. This is called Abstraction.  

Abstraction is used everywhere in our daily lives. Be it computer science, automobiles, or the gadgets and appliances that we use, without abstraction everything would seem very complex and life would become more complicated. Even in books and journals, we can see a section named Abstract that contains a preview of the contents and topics which helps readers to decide whether they wish to go through the entire work.  

As an example of abstraction in real life we can see that we start our car by using the key but we do not see how the engine works internally. We are shown only what is relevant to us. Also, in an elevator we select the floor to which we need to go by pressing a button which makes sense to us, but in reality there is no concept of floor for the elevator. It is just the time duration for which the motor should run and the direction it should rotate to carry the load up or down.

Abstraction is an important concept in Object Oriented Programming where the programmer can hide all irrelevant data about an object in order to reduce complexity of the code and increase program efficiency. It also helps to avoid code duplication, gives more security, and makes code maintenance easier. 

The below diagram shows an example of Abstraction

Article content

Here, for the same car the information relevant to the concerned person is provided and unnecessary information is abstracted. This makes it easier for both the buyer and the mechanic to get necessary information.

To view or add a comment, sign in

More articles by Deshila Technology Research Institute

Insights from the community

Others also viewed

Explore topics