Scala, Design Patterns, Programming, Factory Pattern.
CsvReader(path) } class JsonFactory extends AbstractFactory { override var options: Options = new JsonOptions override def reader(path: String): Reader = JsonReader(path) } They provide access to the Options object through options attribute and to the Reader through the reader method that uses an