In the following code, I’m trying to reuse a lot of the code from
ClassA
and only override a specific function in
ClassB
, is there anyway to do that, or do I need to ensure all of the methods require are created?
interface View {
fun loadFirstPage()
fun otherFunction()
}
open class ClassA: View {
override fun loadFirstPage() { ... }
override fun otherFunction() { ... }
}
class ClassB: ClassA() {
override fun loadFirstPage() { ... }
}
when I load
ClassB
, I’m only seeing the code from
ClassA
be executed