{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

DesignPatternsII - CMSC 132 Object-Oriented Programming II...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
1 CMSC 132: Object-Oriented Programming II Design Patterns II Department of Computer Science University of Maryland, College Park
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2 More Design Patterns Marker interface Label semantic attributes of a class Observer A way of notifying change to a number of classes State Alter an object's behavior when its state changes Visitor Defines a new operation to a class without changing class
Background image of page 2
3 Marker Interface Pattern Definition Label semantic attributes of a class Where to use & benefits Need to indicate attribute(s) of a class Allows identification of attributes of objects without assuming they are instances of any particular class
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
4 Marker Interface Pattern Example Classes with desirable property GoodProperty Original Store flag for GoodProperty in each class Using pattern Label class using GoodProperty interface Examples from Java Cloneable Serializable
Background image of page 4