Kihagyás

Liskov Substitution Principle

Oh, dear Barbara, I thought that this one is trivial, but thanks anyways.

It basically says that every derived class should fit where the parent class does acting the same way the parent does. It's like the Open-Close principle backwards:

Don't change the old code, act like the old code

Microsoft when maintaining Excel

open class W3C{
    open fun renderScrollBar():Boolean{
        /**/
        return true
    }
}

class Firefox: W3C() {
    override fun renderScrollBar():Boolean{
        throw Exception("🔥🦊⚰")
    }
}

It's clear that Firefox had to implement it, but that implementation is nothing but a failure. You can't use Firefox, where the class W3C is useful.

Mostly compatibility issue it is, so leting yourself be compatible with the parent class is a must when doing inheritance.