Created
March 29, 2018 09:53
-
-
Save iamcrypticcoder/57abc63dc8f8b5e9f13603ca100d2ca5 to your computer and use it in GitHub Desktop.
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 WinFactory : AbstractGUIFactory { | |
func createButton() -> Button { | |
return WinButton() | |
} | |
func createWindow() -> Window { | |
return WinWindow() | |
} | |
} | |
class OSXFactory : AbstractGUIFactory { | |
func createButton() -> Button { | |
return OSXButton() | |
} | |
func createWindow() -> Window { | |
return OSXWindow() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment