1. Template Methodhistorical

    When an algorithm's overall steps are fixed but details vary, the template method keeps the process in a parent class and delegates variable parts to concrete implementations.

  2. State Patternhistorical

    The state pattern chooses behavior according to an object's current state. These notes compare it with the strategy pattern through examples.

  3. Strategy Patternhistorical

    When a task has several possible approaches, the strategy pattern separates the algorithms and selects an appropriate strategy.

  4. Observer Patternhistorical

    The observer pattern notifies observers when a target object's state changes. These notes introduce the notification relationship through those two roles.

  5. Chain of Responsibilityhistorical

    A chain of responsibility links handlers for a type of request and passes requests along the chain. These notes illustrate it through scenarios such as Servlet filters.

  6. Mediator Patternhistorical

    Direct interactions among objects can create complex coupling. The mediator pattern places coordination in an intermediary, illustrated here through examples.

  7. Command Patternhistorical

    Examples involving courses and command interfaces demonstrate the command pattern and how requests are wrapped as objects for execution.

  8. Memento Patternhistorical

    The memento pattern stores an object's state for later restoration. These notes examine saving and retrieving state through scenarios such as undo.

  9. Visitor Patternhistorical

    The visitor pattern separates data structures from operations into different classes. These notes use code to examine how operations act on the structure.

  10. Iterator Patternhistorical

    Iterators provide a way to traverse aggregate objects separately from their structure. These notes record the pattern and its use in the JDK.