Scala, Design Patterns, Programming, Factory Pattern.
use them in the method open. abstract class Reader { var path: String def open(): Unit def options: Options } private case class csvReader(var path: String) extends Reader { override def open(): Unit = System.out.println(s"csvReader opened csv on path ${path} with ${options.getOptions}") override