Kotlin, Kotlin Design Patterns, Kotlin Abstract Factory, Kotlin Factory.
override fun createWall(): Wall = PyramidWall() override fun createFloor(): Floor = PyramidFloor() } That’s all the code we needed. You’ll want to depend on these abstractions instead of concrete implementations in your app. The factories will usually be injected into required classes. Thanks for