BITS Pilani: Object Oriented Programming (CS F213) Design Patterns
BITS Pilani: Object Oriented Programming (CS F213) Design Patterns
BITS Pilani: Object Oriented Programming (CS F213) Design Patterns
Design Patterns
Dr. Barsha Mitra
BITS Pilani CSIS Dept, BITS Pilani, Hyderabad Campus
Hyderabad Campus
Design Pattern
•general repeatable solution to a commonly occurring
problem in software design
•isn't a finished design that can be transformed directly into
code
•description or template for how to solve a problem that can
be used in many different situations
• A short name
• A brief description of the context
• A lengthy description of the problem
• A prescription for a solution
• ConcreteAggregate’s responsibility
is to instantiate a ConcreteIterator
that can iterate over its collection
of objects.
• Client class refers (1) to the
Aggregate interface for creating an
Iterator object (createIterator())
and (2) to the Iterator interface for
traversing an Aggregate object
(next()).