Kotlin, Kotlin Design Patterns, Kotlin Abstract Factory, Kotlin Factory.
both the created object and the factory. Every pattern comes with some advantages and disadvantages. To know whether it fits your case, it’s essential to know them: Advantages Object creation code is in one place. It has a single responsibility. You can introduce new object variants without