Ejemplo n.º 1
0
 public static Cake Buy(string strCakeType)
 {
     Cake cake = null;
     if (strCakeType.Equals("BlackForest"))
     {
         cake = new BlackForestCake();
     }
     if (strCakeType.Equals("Angle"))
     {
         cake = new AngleCake();
     }
     return cake;
 }
Ejemplo n.º 2
0
        public static Cake Buy(string strCakeType)
        {
            Cake cake = null;

            if (strCakeType.Equals("BlackForest"))
            {
                cake = new BlackForestCake();
            }
            if (strCakeType.Equals("Angle"))
            {
                cake = new AngleCake();
            }
            return(cake);
        }