Last active
November 3, 2019 03:14
-
-
Save patrickcousins/6b7058a0e8399b6faf1d6aec1ba23a25 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 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