Added a factory design pattern model and example code to the repository