Your SlideShare is downloading. ×
0
Design Pattern -  2. Observer
Design Pattern -  2. Observer
Design Pattern -  2. Observer
Design Pattern -  2. Observer
Design Pattern -  2. Observer
Design Pattern -  2. Observer
Design Pattern -  2. Observer
Design Pattern -  2. Observer
Design Pattern -  2. Observer
Design Pattern -  2. Observer
Design Pattern -  2. Observer
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Design Pattern - 2. Observer

830

Published on

Refers: …

Refers:
Head First Design Pattern.

Published in: Technology, News & Politics
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
830
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
15
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. <ul>Observer Pattern </ul><ul>Company Name </ul>
  • 2. <ul>Observer </ul><ul><li>Problem : </li><ul><li>We have to change values through methods in a class </li></ul></ul>
  • 3. <ul>Update observer from Subject Object </ul>
  • 4. <ul>Observer from Subject Object </ul>
  • 5. <ul>Class Diagram Observer </ul>
  • 6. <ul>Final Diagram </ul>
  • 7. <ul>Interfaces Observer </ul><ul>// interfaccia subject per i metodi di registrazione, cancellazione e notifica di un objserver Public interface Subject { </ul>public void registererObserver(Observer o); public void removeObserver(Observer o); public void notifyObserver(); <ul>} // interfaccia con metodo specifico dell&apos;observer per update degli observer </ul>Public interface Observer { public void update(float temp); } // interfaccia con metodo display per la visualizzazione Public interface DisplayElement{ public void display(); }
  • 8. <ul>Subject implementation </ul>
  • 9. <ul>Observer implementation </ul>
  • 10. <ul>Subject implementation with java built-in </ul>
  • 11. <ul>Observer implementation with java built-in </ul>

×