Module - 3 SA& DP (1)
Module - 3 SA& DP (1)
Behavioural Patterns
2. Command Pattern
3. Interpreter Pattern
4. Iterator Pattern
5. Mediator Pattern
6. Memento Pattern
7. Observer Pattern
8. State Pattern
9. Strategy Pattern
10.Template Method
1.Chain of Responsibility Pattern
o When more than one object can handle a request and the handler
is unknown.
o When the group of objects that can handle the request must be
specified in dynamic way.
2. Command Pattern
o It separates the object that invokes the operation from the object
that actually performs the operation.
o It makes easy to add new commands, because existing classes
remain unchanged.
Example:
3. Interpreter Pattern
Example:
.
4. Iterator Pattern
Advantage:
Usage:
Advantages:
Example:
7. Observer Pattern
Advantages:
8.State Pattern
Usage:
9.Strategy Pattern
Usage:
Advantages:
Usage: