DesignPatternsII

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 DocumentRight 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 DocumentRight 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
Marker Interface Example public interface SafePet { } // no methods class Dog implements SafePet { … } class Piranha { … } class d
Background image of page 5

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

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/12/2012 for the course CMSC 132 taught by Professor Padua-perez during the Fall '08 term at Maryland.

Page1 / 9

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

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online