Scala, Design Patterns, Programming, Factory Pattern.
factory pattern provides a software component named factory that deals with the complexity of object creation for the client and decouples the client code from the code that creates the objects. This makes the object creation code more extensible as it can be extended without needing to change the