Match the following architectural patterns to the descriptions of systems that use that pattern (solutions):

creational
create objects while hiding the creation logic, rather than instantiating objects directly using the new operator, giving the program more flexibility in deciding which objects need to be created
  • abstract factory
  • builder
  • factory method
  • prototype
  • singleton
structural
class and object composition to add functionality
  • adapter
  • bridge
  • composite
  • decorator
  • facade
  • flyweight
behavioral
the ways in which classes or objects interact and distribute responsibilities
  • chain of responsibility
  • command
  • interpreter
  • iterator
  • mediator
  • memento
  • observer
  • state
  • strategy
  • template
  • visitor

(Descriptions of categories adapted from Design Patterns (Gamma et al. 1995) and Tutorials Point’s Design Pattern - Overview)

  1. Creates new object by cloning an existing object to improve performance

    prototype

  2. Hides the complexities of the system and provides the client access

    facade

  3. Represents a group of objects as a single object, typically represented in a tree format

    composite

  4. Class behavior or its algorithm can be changed at runtime

    strategy

  5. Used to reduce the number of objects created for both memory and speed advantages

    flyweight

  6. Changes the executing algorithm of an element class

    visitor

  7. Class behavior changes based on its state

    state

  8. Adds new functionality to an existing object without altering its structure

    decorator

  9. Creates an object but ensures there is only one

    singleton

  10. Creates a complex object that is composed of multiple other objects

    builder

  11. Evaluates a language grammar or expression

    interpreter

  12. Decouples an abstraction from its implementation so the two can vary independently

    bridge

  13. Used to restore the state of an object to a previous state

    memento

  14. Request is wrapped under an object as a command and passed to an invoker object

    command

  15. Access the elements of a collection object in sequential manner

    iterator

  16. Notifies dependent objects of changes to object

    observer

  17. Represents the functionality of another class

    proxy

  18. Handles communication between different classes

    mediator

  19. Creates objects but hides the details of how it is done

    abstract factory

  20. Creates a chain of receiver objects for a request

    chain of responsibility

  21. Connects otherwise incompatible interfaces

    adapter