Exam 3 Design Patterns Flashcards
Creates an instance of several families of classes
Abstract Factory
Allows the same construction process to create different representations
Builder
Creates an instance of several possible derived classes
Factory Method
Restricts Instantiation of a class to a single instance
Singleton
5 Creational Patterns
Abstract Factory Builder Factory Factory Method Prototype Singleton
7 Structural Patterns
Adapter Bridge Composite Decorator Facade Flyweight Proxy
Matches interfaces of different classes Decouples an abstraction from its implementation A class that is the composition of similar classes Allows additional behavior to be dynamically added to a class A single class that provides a simplified interface Uses sharing to support large numbers of fine-grained classes efficiently
Adapter
A class functioning as an interface
Proxy
11 Behavioral Patterns
Chain of Responsibility Command Interpreter Iterator Mediator Memento Observer State Strategy Template Method Visitor
A way of processing a request by a chain of classes
Chain of Responsibility
Encapsulates an action within a class
Command
A way to implement specialized language element
Interpreter
Sequentially access the elements of a collection
Iterator
Provides a unified interface to set of interfaces
Mediator
Captures and restores an object internal state
Memento