Computer Science I / Modular Decomposition and Reuse
Practice question · Match the pairs

Match each modular-design term to what it describes.

  • Module
  • Public interface
  • DRY principle
  • Parallel development
  • The part of a module that other modules may use
  • A self-contained unit responsible for one coherent part of the job
  • Separate people work on separate modules, meeting at the interfaces
  • The same logic should live in exactly one place
Hints
  1. One term names a unit, one names part of a unit, one names a rule and one names a way of working.
  2. Two of the four describe things that only become possible once boundaries are clear.
Show the answer
  • Module A self-contained unit responsible for one coherent part of the job
  • Public interface The part of a module that other modules may use
  • DRY principle The same logic should live in exactly one place
  • Parallel development Separate people work on separate modules, meeting at the interfaces
Why

Modules and their public interfaces are the structure; DRY is the rule that decides where logic belongs; parallel development is a benefit that follows once boundaries are agreed. All three of the latter depend on the first: without real module boundaries there is nothing to publish, nowhere single to put logic, and no way to divide work.

Read the lesson: Modular Decomposition and Reuse →

Practise Modular Decomposition and Reuse

The app has 6 more questions on this lesson, and keeps your place in the course. Computer Science I is free to start.

More questions on Modular Decomposition and Reuse