1. Home
  2. Explore
  3. Computer Science
  4. Design Patterns Review

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Design Patterns Review

  • 87Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Pattern Foundations
The architect who initiated the pattern movement in 1977 through his book A Pattern Language was
.

87 questions

  1. 1
    The architect who initiated the pattern movement in 1977 through his book A Pattern Language was
    _____
    .
    Hint

    He transferred ideas from architecture into a broader theory of recurring solutions.

    Answer

    Christopher Alexander

  2. 2
    Christopher Alexander's 1977 book that established the foundation of the pattern movement was called
    _____
    .
    Hint

    The title combines the idea of recurring solutions with a structured vocabulary.

    Answer

    A Pattern Language

  3. 3
    A design pattern is best defined as a
    _____
    solution for a recurring problem.
    Hint

    The solution has already worked repeatedly in multiple projects.

    Answer

    proven

  4. 4
    Unlike a concrete implementation, a design pattern primarily provides a
    _____
    for solving a problem.
    Hint

    It describes the general approach rather than complete source code.

    Answer

    solution idea

  5. 5
    The transfer of the pattern movement from architecture into software development and software architecture led to the study of
    _____
    patterns.
    Hint

    These patterns address recurring problems in software systems.

    Answer

    software design

  6. 6
    The famous book by the Gang of Four is titled *Design Patterns: Elements of Reusable
    _____
    -Oriented Software*.
    Hint

    The missing term refers to the programming paradigm emphasized by the book.

    Answer

    Object

  7. 7
    The four authors commonly known as the Gang of Four are Ralph Johnson, Erich Gamma, Richard Helm, and John
    _____
    .
    Hint

    He is the fourth author listed in the Gang of Four book.

    Answer

    Vlissides

  8. 8
    The pattern-oriented software architecture books are commonly abbreviated as the
    _____
    books.
    Hint

    The abbreviation comes from the first letters of “pattern-oriented software architecture.”

    Answer

    POSA

  9. 9
    Douglas Schmidt is described in the lecture primarily as a major
    _____
    and author of patterns rather than the inventor of all of them.
    Hint

    He gathered patterns from authors and conferences and documented them.

    Answer

    collector

  10. 10
    The most important evidence that a proposed solution qualifies as a pattern is repeated use by multiple
    _____
    .
    Hint

    A pattern gains credibility when it works in more than one practical setting.

    Answer

    projects

  11. 11
    The name of a pattern should be catchy and concise, such as Adapter, Broker, or
    _____
    .
    Hint

    It is another named pattern discussed in the lecture.

    Answer

    Active Object

  12. 12
    The part of a pattern that explains the situation in which the pattern applies is the
    _____
    .
    Hint

    It specifies the domain and circumstances where the problem occurs.

    Answer

    context

  13. 13
    The part of a pattern that states what must be solved is the
    _____
    .
    Hint

    It identifies the difficult situation that motivates the pattern.

    Answer

    problem

  14. 14
    The conflicting constraints that make a pattern's problem difficult are called
    _____
    .
    Hint

    They pull the design in opposing directions.

    Answer

    forces

  15. 15
    The generic description of how a pattern addresses its problem is the
    _____
    .
    Hint

    It describes the arrangement and interaction that resolves the problem.

    Answer

    solution

  16. 16
    The static part of a pattern's solution describes the participating
    _____
    and classes.
    Hint

    This part focuses on structural participants rather than runtime behavior.

    Answer

    objects

  17. 17
    The dynamic part of a pattern's solution describes how participants collaborate during
    _____
    .
    Hint

    It concerns calls, communication, and construction over time.

    Answer

    runtime

  18. 18
    The benefits and liabilities resulting from applying a pattern are called its
    _____
    .
    Hint

    This part explains what the design gains and what it gives up.

    Answer

    consequences

  19. 19
    The reasoning that explains why a pattern's solution is appropriate is called its
    _____
    .
    Hint

    It provides the justification behind the design decision.

    Answer

    rationale

  20. 20
    Examples of actual implementations of a pattern in real systems are called
    _____
    .
    Hint

    They document where the pattern has already been applied.

    Answer

    known users

  21. 21
    In the pattern-house metaphor, the roof represents the pattern's
    _____
    .
    Hint

    The roof identifies the setting in which the pattern belongs.

    Answer

    context

  22. 22
    In the pattern-house metaphor, the foundation represents the pattern's
    _____
    .
    Hint

    A foundation is formed by evidence from actual applications.

    Answer

    known users

  23. 23
    A wrapping pattern solves a problem by placing another layer of
    _____
    around an existing element.
    Hint

    The new layer hides or adapts the underlying element.

    Answer

    abstraction

  24. 24
    Adapter, Proxy, Decorator, and Facade are examples of
    _____
    patterns.
    Hint

    These patterns place an additional layer around another component.

    Answer

    wrapping

  25. 25
    The main purpose of creational patterns is to
    _____
    objects.
    Hint

    These patterns address object construction and instantiation.

    Answer

    create

  26. 26
    The Builder pattern is useful when creating an object requires multiple
    _____
    .
    Hint

    The object is assembled progressively rather than in one operation.

    Answer

    steps

  27. 27
    The Prototype pattern treats an existing object as a
    _____
    for creating new objects.
    Hint

    New objects are made by copying or adapting an existing example.

    Answer

    template

  28. 28
    The Singleton pattern guarantees that a class has only
    _____
    instance.
    Hint

    Its defining constraint is unique instantiation.

    Answer

    one

  29. 29
    Behavioral patterns primarily change or implement the
    _____
    of objects.
    Hint

    They focus on what objects do and how they react.

    Answer

    behavior

  30. 30
    The Strategy pattern represents an algorithm in an
    _____
    form so that implementations can be exchanged.
    Hint

    The client uses a general interface rather than a fixed algorithm.

    Answer

    abstract

  31. 31
    The Command pattern encapsulates a method, its parameters, and its environment into one
    _____
    .
    Hint

    This makes the operation storable, transferable, or undoable.

    Answer

    object

  32. 32
    The State pattern is especially appropriate when an object is modeled as a
    _____
    machine.
    Hint

    The object's actions depend on its current condition.

    Answer

    state

  33. 33
    Architectural patterns influence the overall software
    _____
    rather than only one method.
    Hint

    They organize the structure of the whole application.

    Answer

    architecture

  34. 34
    Layers, Broker, Master-Slave, Client-Server, and Pipes and Filters are examples of
    _____
    patterns.
    Hint

    They organize broad system structure and communication.

    Answer

    architectural

  35. 35
    The Iterator pattern is designed to work effectively with
    _____
    .
    Hint

    It provides sequential access to elements without exposing the underlying representation.

    Answer

    collections

  36. 36
    The exact implementation of Iterator may differ because each programming
    _____
    determines how it is implemented.
    Hint

    Different languages provide different collection and traversal mechanisms.

    Answer

    language

  37. 37
    Communication patterns help decouple a
    _____
    from a receiver.
    Hint

    The pattern prevents the originator of information from depending directly on its destination.

    Answer

    sender

  38. 38
    A communication pattern may encapsulate information in a
    _____
    before sending it across a network.
    Hint

    The information is packaged like a letter.

    Answer

    message

  39. 39
    Model-View-Controller divides responsibilities among the model, the view, and the
    _____
    .
    Hint

    This component coordinates input and interaction with the other roles.

    Answer

    controller

  40. 40
    Locks, Monitor, Active Object, Future, Scoped Locking, and Async/Await are examples of
    _____
    patterns.
    Hint

    They address coordination and execution of operations that may overlap in time.

    Answer

    concurrency

  41. 41
    Resource patterns address when resources should be acquired and how to avoid forgetting their
    _____
    .
    Hint

    The resource must be returned or cleaned up after use.

    Answer

    release

  42. 42
    Garbage collection, leasing, and scoped resources are techniques associated with
    _____
    patterns.
    Hint

    These techniques manage the lifetime of system resources.

    Answer

    resource

  43. 43
    Reference counting deletes an object when
    _____
    needs it anymore.
    Hint

    Deletion occurs after the number of remaining references reaches zero.

    Answer

    nobody

  44. 44
    The pattern that uses reference counting to manage object lifetime is commonly called the
    _____
    pointer.
    Hint

    Its name refers to counting references to an object.

    Answer

    counted

  45. 45
    Chain of Responsibility and Interpreter are examples of patterns that do not belong to one specific
    _____
    group.
    Hint

    The lecture described them as important patterns outside the main categories.

    Answer

    pattern

  46. 46
    The Interpreter pattern is closely related to an
    _____
    syntax tree.
    Hint

    The common abbreviation is AST.

    Answer

    abstract

  47. 47
    Knowing pattern names and their basic ideas makes communication among developers
    _____
    .
    Hint

    A shared vocabulary allows a complex design to be discussed briefly.

    Answer

    easier

  48. 48
    In the Single Responsibility Principle, a class should have only one responsibility and therefore only one reason to
    _____
    .
    Hint

    The principle limits the causes that should require modifying a class.

    Answer

    change

  49. 49
    The Open-Closed Principle says that software entities should be open for extension but closed for
    _____
    .
    Hint

    New behavior should be added without changing existing source code.

    Answer

    modification

  50. 50
    The Strategy and State patterns can support the Open-Closed Principle by changing behavior through
    _____
    rather than source-code modification.
    Hint

    The original state machine can remain unchanged while its states and transitions vary.

    Answer

    configuration

  51. 51
    The Liskov Substitution Principle requires that derived classes be substitutable for their
    _____
    classes.
    Hint

    A subtype should work wherever its parent type is expected.

    Answer

    base

  52. 52
    The Interface Segregation Principle recommends several fine-grained interfaces instead of one large
    _____
    interface.
    Hint

    Clients should not depend on methods they do not need.

    Answer

    general-purpose

  53. 53
    According to Interface Segregation, an interface should provide a client only the capabilities that the client
    _____
    .
    Hint

    The interface should be restricted to the client's actual requirements.

    Answer

    needs

  54. 54
    The principle “make interfaces easy to use and hard to use
    _____
    ” encourages safe and intuitive APIs.
    Hint

    The goal is to prevent misuse while keeping normal use simple.

    Answer

    wrong

  55. 55
    The Dependency Inversion Principle recommends depending on abstractions rather than
    _____
    classes.
    Hint

    Interfaces and abstract classes are preferred over fixed implementations.

    Answer

    concrete

  56. 56
    Programming against interfaces allows another developer to provide a different
    _____
    of the abstraction.
    Hint

    The client depends on the contract, not on one particular realization.

    Answer

    implementation

  57. 57
    The four general programming principles discussed were decomposition, abstraction, decoupling, and usability and
    _____
    .
    Hint

    The final principle concerns keeping solutions straightforward.

    Answer

    simplicity

  58. 58
    Decomposition breaks a large, difficult problem into smaller
    _____
    that can be solved step by step.
    Hint

    A large project can be divided into chapters or individual pieces of work.

    Answer

    tasks

  59. 59
    Abstraction manages complexity by hiding
    _____
    details behind a simpler layer.
    Hint

    The user of the abstraction need not know how the underlying mechanism works.

    Answer

    implementation

  60. 60
    An Adapter or Proxy can provide abstraction by wrapping a more complicated
    _____
    .
    Hint

    The simpler interface is placed around the underlying mechanism.

    Answer

    layer

  61. 61
    When sending a message over the Internet, an application developer can abstract away details such as the MAC frame and the IP
    _____
    .
    Hint

    It is part of the network information that lower layers manage.

    Answer

    header

  62. 62
    Decoupling delays design decisions so that they can be made at a later
    _____
    .
    Hint

    The decision is not fixed prematurely in the initial design.

    Answer

    time

  63. 63
    Avoiding a direct compile-time knowledge of a communication partner is one way to achieve
    _____
    .
    Hint

    The components can interact without being tightly dependent on one another.

    Answer

    decoupling

  64. 64
    Programming against abstractions helps prevent a small change from requiring recompilation of the complete
    _____
    code.
    Hint

    The principle reduces dependencies among implementation units.

    Answer

    source

  65. 65
    Usable interfaces should adhere to user
    _____
    and make class usage intuitive.
    Hint

    An interface should behave in a way that users naturally anticipate.

    Answer

    expectations

  66. 66
    Avoiding unnecessary complexity means not implementing features before they are
    _____
    .
    Hint

    The lecture warned against premature optimization and over-engineering.

    Answer

    needed

  67. 67
    A design pattern that affects the entire application architecture is classified as an
    _____
    pattern.
    Hint

    Layers and Broker are examples.

    Answer

    architectural

  68. 68
    Classical design patterns influence several components but not the entire software
    _____
    .
    Hint

    They operate at a level larger than one method but smaller than the whole system.

    Answer

    architecture

  69. 69
    Patterns that solve very small, language-specific problems are called
    _____
    .
    Hint

    They are tied to the conventions and features of a particular programming language.

    Answer

    idioms

  70. 70
    The counted pointer, scoped blocking, and scoped resources were presented as examples of
    _____
    .
    Hint

    These solutions are small in scope and often tied to language mechanisms.

    Answer

    idioms

  71. 71
    The Python construct if name equals main was given as an example of a language-specific
    _____
    .
    Hint

    It is a conventional Python structure rather than a language-independent design pattern.

    Answer

    idiom

  72. 72
    The Layers pattern was presented as an example of a pattern that influences the whole software
    _____
    .
    Hint

    It organizes the system into broad structural levels.

    Answer

    architecture

  73. 73
    Reflection allows a program to discover information about an object's methods and attributes during
    _____
    .
    Hint

    The information is obtained while the program is executing.

    Answer

    runtime

  74. 74
    The learning goal that asks why design patterns are needed belongs to design-pattern
    _____
    .
    Hint

    It concerns definitions, purposes, and foundational concepts.

    Answer

    theory

  75. 75
    A major learning goal was to understand the core principles of software design, including the
    _____
    principles.
    Hint

    This acronym names five widely used object-oriented design principles.

    Answer

    SOLID

  76. 76
    Students were expected to know the benefits, drawbacks, context, and appropriate
    _____
    of design patterns.
    Hint

    This concerns when and where a pattern should be used.

    Answer

    application

  77. 77
    Design patterns should be applicable independently of a particular programming
    _____
    .
    Hint

    General design patterns are not the same as language-specific idioms.

    Answer

    language

  78. 78
    Choosing between the Mediator and Observer patterns requires evaluating which pattern is more
    _____
    for the use case.
    Hint

    The decision depends on the specific requirements and consequences.

    Answer

    appropriate

  79. 79
    Using design patterns in a trivial Hello World program would usually be an example of
    _____
    .
    Hint

    The design introduces unnecessary complexity for a very simple problem.

    Answer

    over-engineering

  80. 80
    For a larger project, design patterns can make the architecture more
    _____
    and help avoid common problems.
    Hint

    The architecture can adapt more easily to changes.

    Answer

    flexible

  81. 81
    Reasonable design decisions balance forces and consequences against a specific set of requirements and
    _____
    .
    Hint

    The design must respond to the actual situation being solved.

    Answer

    problems

  82. 82
    Patterns make knowledge explicit by recording it in books, papers, conferences, and
    _____
    .
    Hint

    This medium was also used extensively in the lecture.

    Answer

    videos

  83. 83
    Publishing patterns makes the associated knowledge more
    _____
    to other developers.
    Hint

    People can locate the knowledge in public resources.

    Answer

    findable

  84. 84
    Organizing a pattern in a familiar structure helps make the knowledge
    _____
    .
    Hint

    Readers can more easily interpret information presented in a known format.

    Answer

    understandable

  85. 85
    The most important stage of learning a pattern is knowing how to
    _____
    it in a real-world problem.
    Hint

    Memorizing the name is less valuable than using the idea correctly.

    Answer

    apply

  86. 86
    Patterns express an internal model that helps people judge whether a pattern's
    _____
    are acceptable.
    Hint

    The model supports deciding whether the trade-offs are tolerable.

    Answer

    consequences

  87. 87
    The lecture's closing advice encouraged students to study what interests them and apply ideas to their own problems and
    _____
    .
    Hint

    Learning is strengthened when concepts are tested in personally relevant work.

    Answer

    projects

1 of 87
Question 1 of 87

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent