Put the lines of code in the right order.
Computer scienceProgramming languagesKotlinObject-oriented programmingObject-oriented programming basic
Overriding constructors
Building a house
Report a typo
Reorder lines using drag or arrows. Adjust indentation with left buttons
class House(height: Int, val rooms: Int) : Building(height)
}
constructor(height: Int, material: String) : this(height) {
val house = House(houseParameter[0], houseParameter[1])
fun main() {
}
open class Building(val height: Int) {
// some initialization code
println("${house.height} ${house.rooms}")
val houseParameter = readln().split(" ").map {it.toInt()}
}
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.