Added Factory design pattern example