Wal's Fish Tank

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
(A duplication of Wal's 324 lecture example.)
 
m (Some tweaks to tidy it up a bit.)
Line 1: Line 1:
 
== Wal's Fish Tank ==
 
== 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'').
+
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 11: Line 11:
 
*Fish spawn new fish
 
*Fish spawn new fish
  
[[Image:Fish.jpeg|centre|'''Fish''']]
+
 
 +
[[Image:Fish.jpeg|'''Fish''']]
 +
 
  
 
====Singleton====
 
====Singleton====
 
Only ever one tank
 
Only ever one tank
  
[[Image:Fish_Singleton.jpeg|centre|'''Fish Singleton''']]
+
 
 +
[[Image:Fish_Singleton.jpeg|'''Fish Singleton''']]
 +
 
  
 
====Observer====
 
====Observer====
 
Multiple views possible
 
Multiple views possible
  
[[Image:Fish_Observer.jpeg|centre|'''Fish Observer''']]
+
 
 +
[[Image:Fish_Observer.jpeg|'''Fish Observer''']]
 +
 
  
 
====Composite====
 
====Composite====
 
Schools of fish
 
Schools of fish
  
[[Image:Fish_Composite.jpeg|centre|'''Fish Composite''']]
+
 
 +
[[Image:Fish_Composite.jpeg|'''Fish Composite''']]
 +
 
  
 
====Decorator====
 
====Decorator====
 
Remoras and barnacles
 
Remoras and barnacles
  
[[Image:Fish_Decorator.jpeg|centre|'''Fish Decorator''']]
+
 
 +
[[Image:Fish_Decorator.jpeg|'''Fish Decorator''']]
 +
 
  
 
====Factory Method====
 
====Factory Method====
 
Fish spawn new fish
 
Fish spawn new fish
  
[[Image:Fish_Factory.jpeg|centre|'''Fish Factory''']]
+
 
 +
[[Image:Fish_Factory.jpeg|'''Fish Factory''']]
 +
 
  
 
===The Result===
 
===The Result===
  
[[Image:Fish_Result.jpeg|centre|'''Fish Result''']]
+
 
 +
[[Image:Fish_Result.jpeg|'''Fish Result''']]

Revision as of 20:25, 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


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