public IDairyProducts ProvideDairyProduct(string type)
 {
     IDairyProducts product;
     switch (type)
     {
         case "1":
             product = new Cheeze();
             break;
         case "2":
             product = new Paneer();
             break;
         case "3":
             product = new Curd();
             break;
         default:
             product = new Cheeze();
             break;
     }
     return product;
 }
Beispiel #2
0
        public IDairyProducts ProvideDairyProduct(string type)
        {
            IDairyProducts product;

            switch (type)
            {
            case "1":
                product = new Cheeze();
                break;

            case "2":
                product = new Paneer();
                break;

            case "3":
                product = new Curd();
                break;

            default:
                product = new Cheeze();
                break;
            }
            return(product);
        }