Last active
December 9, 2019 06:13
-
-
Save kinnerapriyap/37597da7273fb00865622d0a67000c9b 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
data class Person( | |
val name: String, | |
val address: String, | |
val age: Int, | |
val isActive: Boolean, | |
val hasPersonWorked: Boolean | |
) { | |
fun isPersonRetired() = | |
hasPersonWorked && (!isActive || age > 60) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment