CISC 323 Intro to Software Engineering
CISC 323 Intro to Software Engineering
CISC 323 Intro to Software Engineering
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
¤<br />
¢ £<br />
¤ ¥<br />
¦ §<br />
¨¥<br />
©�<br />
Solution: Publish and<br />
Subscribe Design Pattern<br />
• A s o u r c e c o m p o n e n t<br />
c o n t a i n s d a t a o n w h i c h<br />
a s e t o f c l i e n t<br />
c o m p o n e n t s d e p e n d<br />
( e . g . , c u r r e n t e x c h a n g e<br />
r a t e )<br />
• T h e c l i e n t c o m p o n e n t s<br />
s u b s c r i b e t o c h a n g e s i n<br />
t h e d a t a<br />
• T h e s o u r c e c o m p o n e n t<br />
p u b l i s h e s a n y c h a n g e s<br />
i n t h e d a t a<br />
¤�<br />
§<br />
©��<br />
�<br />
��<br />
�<br />
�<br />
¡ �<br />
¡<br />
��<br />
��<br />
�<br />
�<br />
� � ����<br />
�£<br />
� § �<br />
¤<br />
¤ ¥<br />
§£ �<br />
�<br />
���<br />
��<br />
(1) Client<br />
component<br />
subscribes <strong>to</strong><br />
changes in<br />
exchange rate<br />
$Cdn cost of<br />
hotel<br />
©§<br />
� �¡<br />
¡<br />
Exchange<br />
Rate<br />
(2) Source<br />
component<br />
publishes<br />
changes in<br />
exchange rate<br />
¡