Sign in

Intro to Computer Science / Unit 3: Algorithms and Problem Solving

3.2 Decomposition and Abstraction

3 practice questionsNot yet reviewed

Notes

Decomposition means breaking a big problem into smaller parts that are easier to solve. Abstraction means hiding unneeded details and focusing on what matters.

  • Example: to build a quiz app, decompose it into: show a question, read the answer, check it, keep score, show the final result.
  • Each part can be written and tested on its own, and different people can work on different parts.
  • Pattern recognition means noticing steps that repeat so they can be reused.
  • Abstraction example: a subway map shows stations and lines but not real distances or street details.

Practice

What is decomposition?
A team is building a weather app. Which is an example of decomposing the problem?
A map app shows roads and landmarks but hides things like individual trees and house paint colors. This is an example of:

Ready for more? Take the Unit 3 test.