Design Patterns mt

Card Set Information

Design Patterns mt
2014-04-19 20:46:17
design patterns midterm

pattern info
Show Answers:

  1. abstract factory
    • creational
    • interface for creating families of related objects without specifying their concrete classes
  2. Builder
    • creational
    • separate the constructions of a complex object from its representation
  3. Factory Method
    • Creational
    • interface fro creating a method
    • let subclasses decide which class to instantiate
  4. Prototype
    • creational
    • specify the kinds of objects to create¬†
    • create new objects by copying
  5. Singleton
    • creational
    • ensures a class only has one instance
    • provides a global point to access it
  6. adapter
    • structural
    • convert the interface of a class into another interface the client expects
  7. Bridge
    • structural
    • separate an abstraction from its implementation
  8. Composite
    • structural
    • compose objects into tree stuctures
  9. Decorator
    • structural
    • attach additional responsibilities to an object
  10. Facade
    • structural
    • provide a unified interface to a set of interfaces
  11. Flyweight
    • structural
    • use sharing to support large number of objects
  12. Proxy
    provides a placeholder for another object to control access to it
  13. Iterator
    provide a way to access the elements without exposing its underlying representation
  14. template method
    lets subclasses redefine certain steps of an algorithm without changing the algorithm's structure
  15. Chain of Responsibility
    • Behavioural
    • chain he receiving objects and pass the request along the chain until an object handles it
    • used in GUI framework event handlers
  16. Command
    • Behavioural
    • encapsulate a request as an object, thereby letting you parametrize clients with different requests
    • used in messaging
  17. Interpreter
    • Behavioural
    • interpret sentences in a language
    • used in compilers
  18. Iterator
    • behavioural
    • access elements sequentially without exposing its underlying representation
  19. Mediator
    • Behavioural
    • define an object that encapsulates how a set of objects interact
    • used in GUI frameworks
  20. Memento
    • without violating encapsulation, capture and externalize an object's internal state so that the object can be restored to this state later
    • behavioural
    • used for collection iteration interface
  21. Observer
    • behavioural
    • one-to-many dependency
    • one object changes and all its dependants are updated automatically
    • MVC frameworks
  22. State
    • behavioural¬†
    • allows an object to alter its behaviour when its internal state changes
    • used in communications systems
  23. Strategy
    • behavioural
    • define algorithms, encapsulate each one and make them interchangeable
    • used in games
  24. Template Method
    • Behavioural
    • define the skeleton of an algorithm in an operation
    • STL
  25. Visitor
    • behavioural
    • lets you define a new operation without changing the class of the element on which it operates
    • STL