Skip to content

Instantly share code, notes, and snippets.

@mayooresan
Created July 12, 2017 09:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mayooresan/89c4c0d5912eb94d8384ee6271975a1f to your computer and use it in GitHub Desktop.
Save mayooresan/89c4c0d5912eb94d8384ee6271975a1f to your computer and use it in GitHub Desktop.
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