🗺️ Abstraction

5th Grade 💻 Coding

Abstraction is deciding what matters in a problem and what you can leave out: focusing on the main thing and hiding details you don’t need right now.

Free · US Letter · no sign-up
Google Classroom Save to Pinterest Email me

A subway map is a great example of abstraction: it doesn’t show buildings, trees or exact distances, only the stations and their order, because that’s what a rider needs. The restroom symbol on a sign is an abstraction too: two simple figures instead of a detailed picture.

In programming, a function is an abstraction: you use print without knowing how it draws letters on the screen. In a soccer video game, nobody programs every blade of grass; a field, lines, players and a ball are enough. Good abstraction turns a huge problem into one you can handle.

For example

  • A road sign with a curving arrow isn’t a photo of the road. It shows only the information the driver needs.
  • In a “catch the apple” game, the apple is a red circle. You don’t need every spot and leaf.

📌 Remember: Abstraction = only what you need. Everything else goes aside.

Quick quiz

  1. What is abstraction?

  2. Which of these is an example of abstraction?

  3. Why is a function a kind of abstraction?

🔎 Ask Thinkapedia another question