Override forget

Report a typo

There are two classes:

open class Device(val type: String) {
    open fun getFullInfo(): String = "$type type"
}

open class InputDevice(type: String, val portsNumber: Int) : Device(type) {
    open fun getFullInfo(): String = "$portsNumber ports"
}

There is a mistake in the InputDevice class, we forgot to add the override keyword for the getFullInfo() function. What will happen next?

Select one option from the list
___

Create a free account to access the full topic