Skip to content

Instantly share code, notes, and snippets.

@patrickcousins
Last active November 3, 2019 03:14
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 patrickcousins/6b7058a0e8399b6faf1d6aec1ba23a25 to your computer and use it in GitHub Desktop.
Save patrickcousins/6b7058a0e8399b6faf1d6aec1ba23a25 to your computer and use it in GitHub Desktop.
class Person(private val name: String, val age: Int, val income: Int = 0) {
fun over65(): Boolean {
return age > 65
}
fun under13(): Boolean {
return age < 13
}
fun isRich(): Boolean {
return income > 1_000_000
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment