Skip to content

Instantly share code, notes, and snippets.


le0nidas/lsp_isp__lsp_fun.kt Secret

Created Feb 7, 2021
What would you like to do?
fun printSeniority(engineer: SoftwareEngineer, yearsInBusiness: Int) {
val seniority = engineer.calculateSeniority(yearsInBusiness)
val label = when (seniority) {
SoftwareEngineer.JUNIOR -> "junior"
SoftwareEngineer.MID -> "mid"
else -> "senior"
println("This is a $label engineer")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment