AbstractionHow to abstract

Once we have recognised patterns in our problems, we use abstraction to gather the general characteristics and to filter out of the details we do not need in order to solve our problem.

Part ofComputer ScienceComputational thinking

How to abstract

Abstraction is the gathering of the general characteristics we need and the filtering out of the details and characteristics that we do not need.

When baking a cake, there are some general characteristics between cakes. For example:

  • a cake needs ingredients
  • each ingredient needs a specified quantity
  • a cake needs timings

When abstracting, we remove specific details and keep the general relevant patterns.

General patternsSpecific details
We need to know that a cake has ingredientsWe don't need to know what those ingredients are
We need to know that each ingredient has a specified quantityWe don’t need to know what that quantity is
We need to know that each cake needs a specified time to bakeWe don't need to know how long the time is
General patternsWe need to know that a cake has ingredients
Specific detailsWe don't need to know what those ingredients are
General patternsWe need to know that each ingredient has a specified quantity
Specific detailsWe don’t need to know what that quantity is
General patternsWe need to know that each cake needs a specified time to bake
Specific detailsWe don't need to know how long the time is