


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



February 27, 2001
© Kenneth M. Anderson, 2001
February 27, 2001
© Kenneth M. Anderson, 2001
3
February 27, 2001
© Kenneth M. Anderson, 2001
Iterator
Interface names can be grouped usingpackages
Java::Collection::Iterator
February 27, 2001
© Kenneth M. Anderson, 2001
5
«interface»
Iterator
init() next() more()
No attributes allowed!
February 27, 2001
© Kenneth M. Anderson, 2001
variables that have, for instance, the Iterator type
Iterator interface without knowing (or caring) aboutwhat its actual type is
February 27, 2001
© Kenneth M. Anderson, 2001
7
Stack
The lollipop
Iterator
February 27, 2001
© Kenneth M. Anderson, 2001
«interface»
Iterator
init() next() more()
Stack
The fact thatrealization hastwo notationsis, in my opinion,unfortunate.
February 27, 2001
© Kenneth M. Anderson, 2001
13
Ken’s Print Queue: Queue
: Photo
A named object
An unnamed object
February 27, 2001
© Kenneth M. Anderson, 2001
:Queue
:Queue
This represents thecollection object andall of its individualinstances
February 27, 2001
© Kenneth M. Anderson, 2001
15
plugin :
If you later discover the typeof an orphan instance, youcan transform it to a namedinstance using the «become»stereotype (not yet covered)
February 27, 2001
© Kenneth M. Anderson, 2001
n: notifier