Exemplo n.º 1
0
        public static Punter FactoryMethod(CommonClass.Punter_Type type)
        {
            switch (type)
            {
            case CommonClass.Punter_Type.Joe: return(new Joe());

            case CommonClass.Punter_Type.Bob: return(new Bob());

            case CommonClass.Punter_Type.Ali: return(new Ali());

            default: throw new NotImplementedException("Punter  Not Defined !!!");
            }
        }
Exemplo n.º 2
0
        public static PunterBaseClass FactoryMethod(CommonClass.Punter_Type size, string name)
        {
            switch (size)
            {
            case CommonClass.Punter_Type.Poor: return(new PoorPunterClass(name));

            case CommonClass.Punter_Type.Medium: return(new MediumPunterClass(name));

            case CommonClass.Punter_Type.Rich: return(new RichPunterClass(name));

            default: throw new NotImplementedException("No Punter Class Defined!!!");
            }
        }
Exemplo n.º 3
0
        public static AbstractPunter FactoryMethod(CommonClass.Punter_Type type)
        {
            switch (type)
            {
            case CommonClass.Punter_Type.Poor: return(new PoorPunter());

            case CommonClass.Punter_Type.Mid: return(new MidPunter());

            case CommonClass.Punter_Type.Rich: return(new RichPunter());

            default: throw new NotImplementedException("Punter Class Not Defined !!!");
            }
        }