Software Design Pattern Trivia Questions

23 Questions | Total Attempts: 2210

SettingsSettingsSettings
Please wait...
Software Design Pattern Trivia Questions

Do you think you can handle these Software Design Pattern Trivia Questions? Today there are a lot of people who are software designers but a few know how the design pattern is structured and how it might vary. Are you among this group of people or are you highly skilled? Take up the quiz below and get to see how well you will do.


Questions and Answers
  • 1. 
    Which Design Pattern should you use when....
    • you want to avoid a permanent binding between an abstraction and its implementation. This might be the case, for example, when the implementation must be selected or switched at run-time.
    • A. 

      Abstract Factory

    • B. 

      Strategy

    • C. 

      Bridge

    • D. 

      Template Method

  • 2. 
    Which Design Pattern should you use when....
    • the construction process must allow different representations for the object that's constructed.
    • A. 

      Singleton

    • B. 

      Composite

    • C. 

      Decorator

    • D. 

      Builder

  • 3. 
    • A. 

      State

    • B. 

      Memento

    • C. 

      Command

    • D. 

      Observer

  • 4. 
    Which Design Pattern should you use when....
    • you want to parameterize objects by an action to perform.
    • A. 

      Command

    • B. 

      Prototype

    • C. 

      Strategy

    • D. 

      Builder

  • 5. 
    Which Design Pattern should you use when....
    • many related classes differ only in their behavior or you need different variants of an algorithm. For example, you might define algorithms reflecting different space/time trade-offs.
    • A. 

      Composite

    • B. 

      Factory Method

    • C. 

      Proxy

    • D. 

      Strategy

  • 6. 
    Which Design Pattern should you use when....
    • you want to represent part-whole hierarchies of objects.
    • A. 

      Composite

    • B. 

      Iterator

    • C. 

      Abstract Factory

    • D. 

      Flyweight

  • 7. 
    Which Design Pattern should you use when....
    • you want to access an aggregate object's contents without exposing its internal representation.
    • A. 

      Iterator

    • B. 

      Composite

    • C. 

      Proxy

    • D. 

      Bridge

  • 8. 
    Which Design Pattern should you use when....
    • a class wants its subclasses to specify the objects it creates.
    • A. 

      Bridge

    • B. 

      Strategy

    • C. 

      Builder

    • D. 

      Factory Method

  • 9. 
    Which Design Pattern should you use when....
    • to control subclasses extensions. You can define a template method that calls "hook" operations at specific points, thereby permitting extensions only at those points.
    • A. 

      State

    • B. 

      Strategy

    • C. 

      Template Method

    • D. 

      Factory Method

  • 10. 
    Which Design Pattern should you use when....
    • you want to provide a simple interface to a complex subsystem.
    • A. 

      Adapter

    • B. 

      Facade

    • C. 

      Abstract Factory

    • D. 

      Composite

  • 11. 
    Which Design Pattern should you use when....
    • an application uses a large number of objects and the storage costs are high because of the sheer quantity of objects.
    • A. 

      Interpreter

    • B. 

      Prototype

    • C. 

      Flyweight

    • D. 

      Decorator

  • 12. 
    Which Design Pattern should you use when....
    • an object structure contains many classes of objects with differing interfaces, and you want to perform operations on these objects that depend on their concrete classes.
    • A. 

      Facade

    • B. 

      Adapter

    • C. 

      Visitor

    • D. 

      Decorator

  • 13. 
    Which Design Pattern should you use when....
    • you want to add responsibilities to individual objects dynamically and transparently, that is, without affecting other objects.
    • A. 

      Visitor

    • B. 

      Proxy

    • C. 

      Decorator

    • D. 

      Memento

  • 14. 
    Which Design Pattern should you use when....
    • there must be exactly one instance of a class, and it must be accessible to clients from a wellknown access point.
    • A. 

      Bridge

    • B. 

      Singleton

    • C. 

      Prototype

    • D. 

      Factory Method

  • 15. 
    Which Design Pattern should you use when....
    • there is a language to interpret, and you can represent statements in the language as abstract syntax trees.
    • A. 

      Interpreter

    • B. 

      Singleton

    • C. 

      Facade

    • D. 

      Composite

  • 16. 
    Which Design Pattern should you use when....
    • you want to use an existing class, and its interface does not match the one you need.
    • A. 

      Adapter

    • B. 

      Decorator

    • C. 

      Mediator

    • D. 

      Proxy

  • 17. 
    Which Design Pattern should you use when....
    • a set of objects communicate in well-defined but complex ways. The resulting interdependencies are unstructured and difficult to understand.
    • A. 

      Facade

    • B. 

      Factory Method

    • C. 

      Template Method

    • D. 

      Mediator

  • 18. 
    Which Design Pattern should you use when....
    • a system should be configured with one of multiple families of products.
    • A. 

      Builder

    • B. 

      Abstract Factory

    • C. 

      Factory Method

    • D. 

      Composite

  • 19. 
    Which Design Pattern should you use when....
    • When an object should be able to notify other objects without making assumptions about who these objects are. In other words, you don't want these objects tightly coupled.
    • A. 

      Visitor

    • B. 

      Adapter

    • C. 

      Observer

    • D. 

      Chain Of Responsibility

  • 20. 
    Which Design Pattern should you use when....
    • a system should be independent of how its products are created, composed, and represented; and when the classes to instantiate are specified at run-time, for example, by dynamic loading
    • A. 

      Prototype

    • B. 

      Facade

    • C. 

      Abstract Factory

    • D. 

      Flyweight

  • 21. 
    Which Design Pattern should you use when....
    • more than one object may handle a request, and the handler isn't known a priori. The handler should be ascertained automatically.
    • A. 

      Observer

    • B. 

      Chain of Responsibility

    • C. 

      Decorator

    • D. 

      Prototype

  • 22. 
    Which Design Pattern should you use when....
    • there is a need for a more versatile or sophisticated reference to an object than a simple pointer and  wraps an object to control access to it.
    • A. 

      Iterator

    • B. 

      Singleton

    • C. 

      Strategy

    • D. 

      Proxy

  • 23. 
    Which Design Pattern should you use when....
    • an object's behavior depends on its state, and it must change its behavior at run-time depending on that state.
    • A. 

      Mediator

    • B. 

      Decorator

    • C. 

      State

    • D. 

      Observer