Created
July 12, 2017 09:49
-
-
Save mayooresan/89c4c0d5912eb94d8384ee6271975a1f 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
protocol Animal{ | |
func run() | |
func stop() | |
} | |
protocol Eye{ | |
func closeEyesAndSleep() | |
func openEyesAndLookAround() | |
} | |
class Cat : Animal, Eye{ | |
func run() { | |
print("Cat is running now") | |
} | |
func stop() { | |
print("Cat has stopped now") | |
} | |
func closeEyesAndSleep() { | |
print("Cat is sleeping now") | |
} | |
func openEyesAndLookAround() { | |
print("Cat is looking around") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment