public IMoto FabricarMoto(EMotos motos) { switch (motos) { case EMotos.CG150: return new CG150(); case EMotos.F800: return new F800(); case EMotos.NINJA250R: return new Ninja250R(); case EMotos.YBR: return new YBR(); default: return null; } }
//Method factory public IMoto FabricarMotos(EMotos en) { switch (en) { case EMotos.BMW: return(new MotoBMW()); case EMotos.HONDA: return(new MotoHonda()); case EMotos.NINJA: return(new MotoNinja()); case EMotos.YBR: return(new MotoYBR()); default: return(null); } }
public IMoto FabricarMoto(EMotos motos) { switch (motos) { case EMotos.CG150: return(new CG150()); case EMotos.F800: return(new F800()); case EMotos.NINJA250R: return(new Ninja250R()); case EMotos.YBR: return(new YBR()); default: return(null); } }