Scala, Design Patterns, Programming, Factory Pattern.
csvReader(var path: String) extends Reader { override def open(): Unit = System.out.println(s"csvReader opened csv on path ${path} with ${options.getOptions}") override def options = new jsonOptions } In this last case the options for csvReader are incorrect as I wrote the options for jsonReader,