Skip to content

Instantly share code, notes, and snippets.

@mayooresan
Last active July 12, 2017 15:18
Show Gist options
  • Select an option

  • Save mayooresan/27e0f6af5fccf90aac362d4ba5b91b61 to your computer and use it in GitHub Desktop.

Select an option

Save mayooresan/27e0f6af5fccf90aac362d4ba5b91b61 to your computer and use it in GitHub Desktop.
class Cat : Animal, Eye{
var isIdle: Bool? = true
func run() {
isIdle = true
print("Cat is running now")
}
func stop() {
isIdle = false
print("Cat has stopped now")
}
func closeEyesAndSleep() {
if isIdle == true{
print("Cat is sleeping now")
}else{
print("Cat will NOT sleep 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