Kotlin的Interface相似於Java 8 可包含抽象方法及方法的實作
也可含有property, 與抽象類別不同的是Interface不能儲存狀態(?)
使用關鍵字interface
interface MyInterface {
    fun bar()
    fun foo() {
      // optional body
    }
}
實作方式
class Child : MyInterface {
    override fun bar() {
        // body
    }
}
可在interface中宣告屬性 屬性可以是抽象的或者可以為引用的類提供實現
interface MyInterface {
    val prop: Int // abstract
    val propertyWithImplementation: String
        get() = "foo"
    fun foo() {
        print(prop)
    }
}
class Child : MyInterface {
    override val prop: Int = 29
}