Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
20 Cards in this Set
- Front
- Back
What is the main purpose of the Factory method? |
To hdie the details of sub-class specific implementations from the Client. |
|
What is the main purpose of the Abstract Factory method? |
To enforce creation of related family objects. |
|
What is the main purpose of the Builder method? |
For multi-step object creation. To separate the construction steps from the low-level representation of the constructed object. |
|
What is a Facade? |
A simple(r) interface to a class, kind of an object container. |
|
What is a Bridge? |
A link between two hierarchies, both of which you're developing. |
|
What is an Adapter? |
A link between two interfaces, at least one of which is out of your control. |
|
What is a Proxy? |
A link to hide the fact that your object defers to a remote service. |
|
What is a Decorator? |
Takes a proxy, and adds to its behavior (decorates it). |
|
What is a Flyweight? |
Sharing data with other objects to avoid duplication and to minimise memory usage. |
|
What is a Composite? |
A tree structure where leaves and branches can be treated as the same. |
|
What is the difference between the Target and Adaptee? |
Target is what the client uses Adaptee is the original interface to adapt to. |
|
What is an Interpreter? |
Interpreting sentences in a grammar. |
|
What is a Chain of Responsibility? |
A chain of objects, passing along (or not) command objects. |
|
What is a Command? |
An object that encloses a generic command. Provides a nice generic "execute" method to fire the command whatever the underlying behavior is. |
|
What is an Iterator? |
Allows a collection to be iterated over by adding "next()(" "hasNext()" and other iteration-friendly operators to their abstractions. |
|
What is a Mediator? |
Acts as a communication hub for multiple objects. |
|
What is a Memento? |
Saves state; allows rollback. |
|
What is a State? |
Strategy pattern but based on an object's state. |
|
What is a Visitor? |
Iterate over a hierarchy to take both caller and callee type into account without a huge loop+case statement. |
|
What is the intent of the Template method? |
To define a skeleton algorithm by deferring some steps to subclasses. To allow the subclass to redefine certain steps. |