Problem Statement
How do you make a class inheritable in Kotlin?
Explanation
Kotlin classes are final by default to encourage composition over inheritance and prevent fragile base class problems, so you must explicitly mark classes with open keyword to allow inheritance. Methods and properties also need to be marked open to be overridable, making the class's contract explicit about what can be extended.
To inherit from a class, use colon syntax like class Derived colon Base open paren close paren, calling the base class constructor. This design encourages safer inheritance by making extensibility intentional rather than accidental, following the principle that classes should be designed for inheritance or prohibited from it.
