Find a bug

Report a typo

Your program looks as follows:

open class Human(val name: String = "Unknown", val age: Int, val height: Int) {
    constructor(age: Int, name: String) : this(18, 185, name)
}

class DerivedHuman(val weight: Int, age: Int, height: Int, name: String = "Unknown") : Human(age, height, name)

fun main() {
    val someone = DerivedHuman(65, 21, 195)
}

Choose the correct code snippet to define the class Human.

Select one option from the list
___

Create a free account to access the full topic