Design Defects and RestructuringLECTURE 11SAT, NOV 16, 2019
Behavioral PatternsChain of ResponsibilityCommandInterpreterIteratorMediatorMementoObserverStateStrategyTemplate MethodVisitor2
InterpreterIntent◦Given a language, define a representation for its grammar along with an interpreter that uses the representation to interpret sentences in the languageApplicability◦The grammar is simple◦Efficiency is not a critical concern3
IteratorIntent◦Provide a way to access the elements of an aggregate object sequentially without exposing its underlying representationApplicability◦To access an aggregate object’s contents without exposing its internal representation◦To support multiple traversals of aggregate objects◦To provide a uniform interface for traversing different aggregate structures (to support polymorphic iteration)5
MediatorIntent◦Define an object that encapsulates how a set of objects interact◦
You've reached the end of your free preview.
Want to read all 14 pages?
Design pattern, Software design patterns, elements of an aggregate object