by 예제 interface Attackable { fun attack(): String } class Knife : Attackable { override fun attack() = "attack with knife" } class Gun : Attackable { override fun attack() = "attack with gun" } class Attacker(val impl: Attackable) : Attackable by impl { fun attackEmoji() = "${attack()} 😱😵" } fun main() { println(Attacker(Knife()).attackEmoji()) println(Attacker(Gun()).attackEmoji()) } 하위 클래스가 상위..