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;
71 Cards in this Set
- Front
- Back
The ________________ provides an interface for creating families of related or dependent objects without specifying their concrete classes.
|
Abstract Factory
|
|
The ____________ separates the construction of a complex object from its representation so that the same construction process can create different representations.
|
Builder
|
|
"The _________ defines an interface for creating an object
|
but let subclasses decide which class to instantiate."
|
|
"The _______ specify the kinds of objects to create using a prototypical instance
|
and creates new objects by copying this prototype"
|
|
"The _______ ensures a class only has one instance
|
and provide a global point of access to it."
|
|
The ______ converts the interface of a class into another interface clients expect.
|
Adapter
|
|
The ________ decouples an abstraction from its implementation so that the two can vary independently
|
Bridge
|
|
The _________ compose objects into tree structures to represet part-whole hierarchies
|
Composite
|
|
"____________ attach additional responsibilities to an object dynamically
|
providing a flexibile alternative for extending functionality."
|
|
___________ provides a unified interface to a set of interfaces in a subsystem.
|
Facade
|
|
___________ uses sharing to support large numbers of fine-grained objects efficiently
|
Flyweight
|
|
_______ provides a surrogate or placeholder for another object to control access to it.
|
Proxy
|
|
The ___________ avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request.
|
Chain of Responsibility
|
|
"The ____________ encapsulated a request as an object
|
thereby letting you parameterize clients with different requests
|
|
Given a language define a representation for its grammar along with an ____________ that uses the representation to interpret sentences in the language
|
Interpreter
|
|
The __________ provides a way to access the elements of an aggregate object sequentially without exposing the underlying representation.
|
Iterator
|
|
The _____________ defines an object that encapsulates how a set of objects interact
|
Mediator
|
|
"The ___________ memento
|
without violating encapsulation
|
|
"The _____________ defines a one-to-many dependency between objects so that when one object changes state
|
all its dependents are notified and updated automatically."
|
|
Allow an object to alter its behaviour when its internal _______ changes.
|
State
|
|
"The ________ defines a family of algorithms
|
encapsulates each one
|
|
"The _________ defines the skeleton of an algorithm in an operation
|
deferring some steps to subclasses."
|
|
The ____________ represents an operation to be performed on the elements of an object structure.
|
Visitor
|
|
What are the creational patterns?
|
"Abstract Factory
|
|
What are the structural patterns?
|
"Adapter
|
|
What are the behavioral patterns?
|
"Chain of Responsibility
|
|
Facade and Abstract Factory are often a single instance so they are also a _________
|
Singleton
|
|
Abstract Factory can be dynamically configured using ____________
|
Prototype
|
|
Abstract Factory is implemented using __________
|
Factory Method
|
|
Template Method often uses ________
|
Factory Method
|
|
Template Method often defines the algorithm’s steps of __________
|
Strategy
|
|
Observer can use __________ to manage complex dependencies
|
Mediator
|
|
Chain of responsibility can use a _______ to define the chain itself.
|
Composite
|
|
"States
|
Strategies and Interpreter’s terminal symbols can be shared with ________"
|
|
Interpreter can define its grammar with _________
|
Composite
|
|
Interpreter can add operations with _________
|
Visitor
|
|
Change the skin with _________ versus guts with ________
|
"Decorator
|
|
Composite can use _______ to add responsibilities to objects
|
Decorator
|
|
Composite can be shared with ________
|
Flyweight
|
|
Composite can use ________ to add operations
|
Visitor
|
|
Composite can be created with ________
|
Builder
|
|
Composite can enumerate children with ________
|
Iterator
|
|
Command can be constructed with _______
|
Composite
|
|
Command can avoid hysteresis with _______
|
Memento
|
|
Visitor can define traversals with ______
|
Iterator
|
|
Iterator can save state of iteration with _______
|
Memento
|
|
What are the consequences of the Abstract Factory?
|
It isolates subclasses; it makes exchanging product families easy; it promotes consistency among products; supporting new kinds of products is difficult because the Abstract Factory interface fixes the set of products the can be created.
|
|
What are the consequences of the Builder pattern?
|
It lets you vary a product’s internal representation: all you have to is define a new kind of builder; it isolates code for construction and representation; it gives you finer control over the construction process.
|
|
What are the consequences of the Factory Method pattern?
|
Provides hooks for subclasses; connects parallel hierarchies;
|
|
What are the consequences of the Prototype pattern?
|
Adding and removing products at runtime; specifying new objects by varying values; specifying new objects by varying structure; reduced subclassing; configuring an application with classes dynamically.
|
|
What are the consequences of the Singleton pattern?
|
Controlled access to sole instance; reduced name space; permits refinement of operations and representation; permits a variable of instances; more flexible than class operations;
|
|
What are the consequences of the Adapter pattern?
|
"Class Adapter: A class adapter won’t work when we want to adapt a class and all its subclasses; lets Adapter override some of Adaptee’s behavior since Adapter is a subclass of Adapter; introduces only one object
|
|
What are the consequences of the ___________ pattern?
|
It supports variations in the traversal of an aggregate; iterators simplify the Aggregate interface; more the one traversal can be pending on an aggregate.
|
|
What are the consequences of the ________ iterator pattern?
|
It limits subclassing; it decouples Collegues; it simplifies object protocols; it abstracts how objects cooperate; it centralizes control.
|
|
What are the consequences of the Bridge pattern?
|
Decoupling interface and implementation; improved extensibility; hiding implementation details from clients.
|
|
What are the consequences of the Composite pattern?
|
makes the client simple; makes it easier to add new kinds of components; can make the design overly general.
|
|
What are the consequences of the Decorator pattern?
|
More flexibility than static interfaces; avoids feature-laden classes high up the hierarchy; a decorator and its component are not identical; lots of little objects.
|
|
What are the consequences of the Facade pattern?
|
It shields clients from subsystem components; it promoted weak coupling between the subsystem and its clients; it doesn’t prevent applications from using subsystem classes if they need to.
|
|
What are the consequences of the Flyweight pattern?
|
"Storage savings; it may introduce costs associated with transferring
|
|
What are the consequences of the Proxy pattern?
|
A remote proxy can hide the fact that an object resides in different address space; a virtual proxy can perform optimizations such as creating an object on demand; both protection proxies and smart references allow additional housekeeping tasks when an object is accessed.
|
|
What are the consequences of the Chain of Responsibility pattern?
|
Reduced coupling; added flexibility in assigning responsibilities to objects; receipt isn’t guaranteed.
|
|
What are the consequences of the Command pattern?
|
Decouples the object that invokes the operation from the one that knows how to perform it; commands are first-class objects; you can assemble commands into a composite command; it’s east to add new commands.
|
|
What are the consequences of the Interpreter pattern?
|
"It’s easy to change and extend the grammar; implementing the grammar is easy
|
|
What are the consequences of the Iterator pattern?
|
It supports variations in the traversal of the Aggregate; iterators simplify the Aggregate interface; more than one traversal con be pending on an aggregate.
|
|
What are the consequences of the Mediator pattern?
|
It limits subclassing; it decouples colleagues; it simplifies object protocols; it abstracts how objects cooperate; it centralizes control.
|
|
What are the consequences of the Memento pattern?
|
It preserves the encapsulation boundaries; it simplifies Originator; using memento might be expensive; it might be difficult in some languages to ensure that only the Originator can access the Memento’s state; hidden costs in caring for memento.
|
|
What are the consequences of the Observer pattern?
|
Abstract coupling between Subject and Observer; support for broadcast communication; unexpected updates.
|
|
What are the consequences of the State pattern?
|
It localizes state-specific behavior and partitions behavior for different states; it makes state transition explicit; state objects can be shared.
|
|
What are the consequences of the Strategy pattern?
|
Families of related algorithms; an alternative to subclassing; strategies eliminates conditional statements; a choice of implementations; clients must be aware of different strategies; communication overhead between Strategy and Context; Increased number of objects.
|
|
What are the consequences of the Template Method?
|
Inversion of control.
|
|
What are the consequences of the Visitor pattern?
|
Makes adding new operations easy; a visitor gather related operations and separates unrelated ones; adding new ConcreteElement classes is hard; visiting across class hierarchies; accumulating state; breaking encapsulation.
|