Wal's Fish Tank

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
m (Some tweaks to tidy it up a bit.)
m (Some more tweaks)
Line 1: Line 1:
 
== Wal's Fish Tank ==
 
== Wal's Fish Tank ==
  
This content is duplicated from [[User:Warwick Irwin|Wal's]] Cosc324 lecture material of 2008. It has been reproduced with the permission of Lord Wal (''One pattern to rule them all and in the design philosophy bind them'').
+
This content is duplicated from [[User:Warwick Irwin|Wal's]] Cosc324 lecture material of 2008. It has been reproduced with the permission of Lord Wal (''One pattern to rule them all and in the design philosophy bind them!'').
  
 
===Simulated fish tank===
 
===Simulated fish tank===
Line 15: Line 15:
  
  
====Singleton====
+
====[[Singleton]]====
 
Only ever one tank
 
Only ever one tank
  
Line 22: Line 22:
  
  
====Observer====
+
====[[Observer]]====
Multiple views possible
+
Multiple views possible (FishView is a gui view)
  
  
Line 29: Line 29:
  
  
====Composite====
+
====[[Composite]]====
 
Schools of fish
 
Schools of fish
  
Line 36: Line 36:
  
  
====Decorator====
+
====[[Decorator]]====
 
Remoras and barnacles
 
Remoras and barnacles
  
Line 43: Line 43:
  
  
====Factory Method====
+
====[[Factory Method]]====
 
Fish spawn new fish
 
Fish spawn new fish
  

Revision as of 20:29, 14 October 2009

Contents

Wal's Fish Tank

This content is duplicated from Wal's Cosc324 lecture material of 2008. It has been reproduced with the permission of Lord Wal (One pattern to rule them all and in the design philosophy bind them!).

Simulated fish tank

  • Lots of different kinds of fish
  • Only ever one tank
  • Multiple views possible
  • Schools of fish
  • Remoras and barnacles
  • Fish spawn new fish


Fish


Singleton

Only ever one tank


Fish Singleton


Observer

Multiple views possible (FishView is a gui view)


Fish Observer


Composite

Schools of fish


Fish Composite


Decorator

Remoras and barnacles


Fish Decorator


Factory Method

Fish spawn new fish


Fish Factory


The Result

Fish Result

Personal tools