Singleton Pattern   «Prev  Next»

Consequences of the Singleton Pattern - Quiz

Each question is worth one point. Select the best answer for each question.
 
1. What kind of pattern is Singleton?
Please select the best answer.
  A. object creational
  B. object structural
  C. class behavioral
  D. class creational

2. The collaborations in a design pattern describe:
Please select the best answer.
  A. The classes that collaborate with one another to form the pattern
  B. How classes and objects outside the pattern interact with the pattern
  C. How functions in the pattern invoke other functions in the pattern
  D. How methods in the pattern invoke other methods in the pattern

3. Which of the following is a consequence of the Singleton?
Please select the best answer.
  A. Pure static members lend themselves to subclassing
  B. Different subclasses can be configured randomly
  C. The Singleton object can be used by one object at a given time
  D. Access to the object is controlled

4. A Singleton class would best be used to represent:
Please select the best answer.
  A. A parallel port
  B. A serial port
  C. A computer's audio device
  D. A monitor

Correct answers:



Your Score: 0