Problem Decomposition

Cards (10)

  • What is problem decomposition?
    Breaking a large problem into smaller problems
  • Why might you break down a problem further in problem decomposition?
    To simplify complex tasks into manageable actions
  • What can the lowest level problems in decomposition represent?
    A single task or action
  • What can the lowest level problems be coded as?
    Procedure, module, function, or method
  • What is a limitation of the top-down hierarchical approach in problem decomposition?
    Not all problems can be easily broken down
  • Which type of programs are typically harder to break down using a top-down approach?
    Event-driven programs with graphical user interfaces
  • How can you start breaking down a complex problem in event-driven programs?
    By separating out main areas of functionality
  • What is step-wise refinement in problem decomposition?
    • An approach to tackle problem decomposition
    • Produces a top-down modular design
    • Aims for small, independent modules
    • Modules can be written and tested in isolation
  • How does a top-down modular design visually represent problem decomposition?
    • Number of boxes increases downwards
    • Top box: overall program name
    • Green boxes: key interface screens
    • Blue boxes: main game objects
    • Orange boxes: actions of objects
  • Is there a "right" answer to producing diagrams in problem decomposition?
    No, it depends on how you visualize the problem