GofPattern
SiteMap
Design Patterns Course
Behavioral Patterns
Creational Patterns
Structural Patterns
Design Patterns
«Prev
Next»
Design Patterns
Defining Patterns
Design Challenges
Pattern Concept
Design Pattern Components
Big-O Notation
Design Pattern Benefits
Three Types Design Patterns
Design Pattern Scope
Traffic Signals Project
Patterns Conclusion
Singleton Patterns
Design Pattern Elements
Intent Motivation
Pattern Applicability
Singleton Pattern Structure
Singleton Pattern-Quiz
Participants Collaborations
Consequences Effects
Class Implementation
Real World Examples
Substitute Patterns
Extension Variation Pattern
Course Project
Perfect Singleton
Pattern Conclusion
Creational Patterns
Creational Design Pattern
Creational Pattern Uses
Common Creational Patterns
Factory Pattern
Factory Method-Exercise
Factory Method Structure
Factory Method Consequences
Structural Patterns
Structural Pattern Example
StructuralPatterns Help Programmers
Patterns Help Programmers
Common Structural Patterns
Flyweight Pattern Motivation
Flyweight Suitability
FlyweightPattern Structure
FlyweightConsequences
Class Vehicles Intersection
Structural Patterns Conclusion
Behavioral Patterns
Define Behavioral Patterns
BehavioralPatterns Help Programmers
Common Behavioral Patterns
Observer Pattern Motivation
ObserverStructure TimeObserver Interface
TimeClass AsObserved Object
Observer Pattern Tradeoffs
Problems Require Mediator
Mediator Pattern Applicability
Mediator Pattern Structure
Benefits Pitfalls MediatorPattern
MediatorClass Course Project
Behavioral DesignPatterns Conclusion
Designing Software
How to Choose Pattern
How To Apply Pattern
Lessons Learned
Combine Design Patterns
Design Pattern Limitations
Traffic flow System
Course Conclusion
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
Submit
Quiz Explanation