Pratical Factory, Builder Design Patterns

it helps to create object based on the type given as input