In computer science, abstraction is a technique for managing complexity of computer systems. It works by establishing a level of complexity on which a person interacts with the system, suppressing the more complex details below the current level.
In order to create complex computer system, computer scientists have to look at the big picture first to clearly identify the problem they want to solve and progressively elaborate a solution to solve this problem. This is the concept of abstraction, which can be broken down in a few set of steps. Each step enables computer scientists to add more details on how they will solve their problem.
Abstraction Step 1: Problem Definition:
It is essential to clearly identify the problem that we want to solve. To do so it is essential to understand the needs of the end-user and the difference between computerised models and the reality.
For this blog post, we are going to focus on the following problem:
How can we create a computer program used in the Google car to inform the passengers on the directions for their journey as well as to provide them with factual information such as estimated mileage and duration of their journey?
Abstraction Step 2: Identify the inputs and outputs of our solution:
In our scenario we have the following inputs and outputs:
Abstraction Step 3: Identify the main components of our problem:
In our scenario we have identified four main components as follows:
Abstraction Step 4: Identify potential for code reusability by:
- Using existing libraries,
- Defining functions and procedures,
- Using Object Oriented concepts such as the use of Classes and objects.
Abstraction Step 5: Design the programming algorithms:
Design the algorithms for every element of the solution. These algorithms will be based on the key procedural programming concepts: Sequencing, Selection and Iteration.
These algorithms will also rely on the use of variables and appropriate data structures.