Created
March 1, 2017 10:57
-
-
Save hudinwal/8a57dcd31fd5b457caa7fa7fa6222156 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 Diver: Swimmable { | |
func swim() { | |
print("Diver is swiming") | |
} | |
} | |
class Whale: Swimmable { | |
func swim() { | |
print("Whale is Swiming") | |
} | |
} | |
let expertDiver = Diver() | |
expertDiver.swim() | |
let blueWhale = Whale() | |
blueWhale.swim() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment