コード例 #1
0
        public PriceBase CreatePrice(int priceCode)
        {
            PriceBase _price = null;

            switch (priceCode)
            {
            case 2:
                _price = new ChildrenMoviePrice(priceCode);
                break;

            case 1:
                _price = new NewMoviePrice(priceCode);
                break;

            case 0:
                _price = new RegularMoviePrice(priceCode);
                break;
            }
            return(_price);
        }
コード例 #2
0
 public PriceBase CreatePrice(int priceCode)
 {
     PriceBase _price = null;
     switch (priceCode)
     {
         case 2:
             _price = new ChildrenMoviePrice(priceCode);
             break;
         case 1:
             _price = new NewMoviePrice(priceCode);
             break;
         case 0:
             _price = new RegularMoviePrice(priceCode);
             break;
     }
     return _price;
 }