Exemple #1
0
        public Pizza CreatePizza(string type)
        {
            Pizza p = null;

            if (type == "cheese")
            {
                p = new CheesePizza();
            }
            else if (type == "clam")
            {
                p = new ClamPizza();
            }

            return(p);
        }
Exemple #2
0
        public Pizza CreatePizza(string type)
        {
            Pizza p = null;

            if (type == "cheese")
            {
                p = new CheesePizza();
            }
            else if (type == "clam")
            {
                p = new ClamPizza();
            }

            return p;
        }