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