GofPatterns
SiteMap
Design Patterns Course
Behavioral Patterns
Creational Patterns
Structural Patterns
Creational Patterns
«Prev
Next»
Design Patterns
Defining Patterns
Three Types Design Patterns
Behavioral Creational Structural
Design Pattern Components
Design Pattern Benefits
Design Pattern Scope
Three Categories Patterns
Singleton Patterns
Singleton Pattern-Quiz
Real World Examples
Design Pattern Elements
Creational Patterns
Factory Method Consequences
Factory Method-Exercise
Common Creational Patterns
Structural Patterns
Structural Pattern Example
Patterns Help Programmers
Common Structural Patterns
Flyweight Pattern
Flyweight Consequences
GOF Structural Patterns
Adapter Bridge Composite
Flyweight Suitability
Behavioral Patterns
Define Behavioral Patterns
Mediator Pattern Applicability
Observer Pattern Tradeoffs
Designing Software
How to Choose Pattern
Combine Design Patterns
Design Pattern Limitations
How To Apply Pattern
Common Creational Patterns - Quiz
Each question is worth one point. Select the best answer or answers for each question.
1.
Suppose you need to create new objects by copying an existing object. Which of the following patterns would you most likely use?
Please select the best answer.
A.
Abstract Factory
B.
Builder
C.
Prototype
D.
Singleton
2.
Suppose you need to define an interface for creating instances of several related abstract classes without specifying their concrete subclasses. Which of the following patterns would you most likely use?
Please select the best answer.
A.
Abstract Factory
B.
Builder
C.
Prototype
D.
Factory
3.
Suppose you need to define an abstract interface for creating a complex object from its component parts, but allow different subclasses to create different representations of the parts? Which of the following patterns would you most likely use?
Please select the best answer.
A.
Abstract Factory
B.
Builder
C.
Prototype
D.
Factory
4.
The
java.awt.Toolkit
class is an example of which pattern:
Please select the best answer.
A.
Abstract Factory
B.
Builder
C.
Prototype
D.
Factory Method
Correct answers:
Your Score: 0
Submit
Quiz Explanation