GOFPatterns
Technology
Search
SiteMap
eWebProgrammer
J2EEOnline
Design Patterns
Defining Patterns
Singleton Patterns
Creational Patterns
Structural Design Patterns
Behavioral Design Patterns
Design Pattern SW Design
Common Creational Patterns - Quiz
Select the best answer 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
Score =
Correct answers:
Explanation