Q. Which of the following describes the Facade pattern correctly?

  • (A) this pattern allows a user to add new functionality to an existing object without altering its structure
  • (B) this pattern is used where we need to treat a group of objects in similar way as a single object
  • (C) this pattern hides the complexities of the system and provides an interface to the client using which the client can access the system
  • (D) this pattern is primarily used to reduce the number of objects created and to decrease memory footprint and increase performance
πŸ’¬ Discuss
βœ… Correct Answer: (C) this pattern hides the complexities of the system and provides an interface to the client using which the client can access the system

Q. The use of design patterns for the development of object-oriented software has important implications for ____________

  • (A) component-based software engineering
  • (B) reusability in general
  • (C) all of the above
  • (D) none of above
πŸ’¬ Discuss
βœ… Correct Answer: (C) all of the above

Q. In which of the following pattern a class represents functionality of another class?

  • (A) proxy pattern
  • (B) chain of responsibility pattern
  • (C) command pattern
  • (D) interpreter pattern
πŸ’¬ Discuss
βœ… Correct Answer: (A) proxy pattern

Q. The client software uses the ___________ which provides an interface for creating families related or dependent objects.

  • (A) constant factory
  • (B) abstract factory
  • (C) full factory
  • (D) intermediate factory
πŸ’¬ Discuss
βœ… Correct Answer: (B) abstract factory

Q. Which pattern is used when configuring an application with classes dynamically.

  • (A) facade pattern
  • (B) builder pattern
  • (C) prototype pattern
  • (D) bridge pattern
πŸ’¬ Discuss
βœ… Correct Answer: (C) prototype pattern

Q. ___________ pattern ensure a class only has one instance and provide a global point of access to it.

  • (A) singleton pattern
  • (B) filter pattern
  • (C) state pattern
  • (D) bridge pattern
πŸ’¬ Discuss
βœ… Correct Answer: (A) singleton pattern

Q. The ____________ is often employed when there is a need to use different sets of objects and where the objects could be added or changed some time during the lifetime of an application.

  • (A) abstract factory
  • (B) singleton pattern
  • (C) builder pattern
  • (D) prototype pattern
πŸ’¬ Discuss
βœ… Correct Answer: (A) abstract factory

Q. Which pattern is used When an object wants to publish information and many objects will need to receive that information.

  • (A) publisher pattern
  • (B) brodcast pattern
  • (C) observer pattern
  • (D) none of above
πŸ’¬ Discuss
βœ… Correct Answer: (C) observer pattern

Q. A ___________ is an object that stores a snapshot of the internal state of another object.

  • (A) observer
  • (B) memento
  • (C) create
  • (D) none of above
πŸ’¬ Discuss
βœ… Correct Answer: (B) memento

Q. Which of the following describes the Command pattern correctly?

  • (A) in this pattern a class represents functionality of another class.
  • (B) this pattern creates a chain of receiver objects for a request.
  • (C) this pattern provides a way to evaluate language grammar or expression.
  • (D) in this pattern a request is wrapped under an object as command and passed to invoker object.
πŸ’¬ Discuss
βœ… Correct Answer: (D) in this pattern a request is wrapped under an object as command and passed to invoker object.

Jump to