Download presentation
Presentation is loading. Please wait.
1
Oct 200592.3913 Ron McFadyen1 Collaborations Collaboration : an arrangement of classes, links, roles in a context to implement some behaviour. Useful for showing a system’s applications of patterns. Name of pattern appears in a dashed oval. Links to classes shown with participation roles. The value of using collaborations on your class diagram is to show what patterns you have used and the roles that classes and objects will be playing. See Figures 17-4, 17-10 in UML text, and see handout from Holub on Patterns.
2
Oct 200592.3913 Ron McFadyen2 Weather Station Class Diagram «interface» Subject attach() detach() notify() «interface» Observer update() WeatherData attach() detach() notify() CurrentConditionsDisplay update() display() * StatisticsDisplay update() display() ForecastDisplay update() display() «interface» DisplayElement display()
3
Oct 200592.3913 Ron McFadyen3 Class Diagram showing Observer Collaboration «interface» Subject attach() detach() notify() «interface» Observer update() WeatherData attach() detach() notify() CurrentConditionsDisplay update() display() * StatisticsDisplay update() display() ForecastDisplay update() display() «interface» DisplayElement display() Observer subject observer Concrete subject Concrete observer
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.