Challenge 2: Interface with a Default Method — Solution interface Greetable { val name: String fun customGreeting(): String fun greet() = println(customGreeting()) } class FormalPerson(override val name: String) : Greetable { override fun customGreeting() = "Good day, I am $name." } class CasualPerson(override val name: String) : Greetable { override fun customGreeting() = "Hey, it's $name!" } fun main() { val formal: Greetable = FormalPerson("Dr. Smith") val casual: Greetable = CasualPerson("Jamie") formal.greet() casual.greet() } /* Output: Good day, I am Dr. Smith. Hey, it's Jamie! Notes: - name and customGreeting() are abstract — every class implementing Greetable must supply both. - greet() has a default body in the interface itself, so neither FormalPerson nor CasualPerson needs to implement it — both inherit the same greet() logic, which simply calls each class's own customGreeting(). - override is required on "val name" in each class because interface properties, like interface methods, must be explicitly overridden. */