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