Created
March 15, 2012 13:54
-
-
Save eamonnfaherty/2044307 to your computer and use it in GitHub Desktop.
creator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Box() { | |
function Box(width:int, height:int) { | |
} | |
public static function bigBox():Square { | |
return new Square(200,200); | |
} | |
public static function littleBox():Square { | |
return new Square(20,20); | |
} | |
} | |
//edit a factory is nicer / more testable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment