Created
November 20, 2019 17:50
-
-
Save riccjohn/fc4dbfbe4f3ac15d3070d06cace9efd3 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 Dog { | |
func bark() { | |
print("woof!") | |
} | |
func eat() { | |
print("nom nom nom") | |
} | |
} | |
class Robot { | |
func clean() { | |
print("Cleaning! beep boop") | |
} | |
} | |
let Quinn = Dog() | |
Quinn.bark() // "woof!" | |
Quinn.eat() // "nom nom nom" | |
let Alfred = Robot() | |
Alfred.clean() // "Cleaning! beep boop" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment