Lecture 11.pdf - Design Defects and Restructuring LECTURE...

This preview shows page 1 - 8 out of 14 pages.

Design Defects and Restructuring LECTURE 11 SAT, NOV 16, 2019
Image of page 1
Behavioral Patterns Chain of Responsibility Command Interpreter Iterator Mediator Memento Observer State Strategy Template Method Visitor 2
Image of page 2
Interpreter Intent Given a language, define a representation for its grammar along with an interpreter that uses the representation to interpret sentences in the language Applicability The grammar is simple Efficiency is not a critical concern 3
Image of page 3
Interpreter 4
Image of page 4
Iterator Intent Provide a way to access the elements of an aggregate object sequentially without exposing its underlying representation Applicability 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
Image of page 5
Iterator 6
Image of page 6
Mediator Intent Define an object that encapsulates how a set of objects interact
Image of page 7
Image of page 8

You've reached the end of your free preview.

Want to read all 14 pages?

  • Fall '19
  • Design pattern, Software design patterns, elements of an aggregate object

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes