예제 #1
0
        public ICarDealerTask CreateCarDeal(string car_name)
        {
            ICarDealerTask car;

            if (car_name == "Ford")
            {
                car = new Ford();
                return car;
            }

            if (car_name == "Toyota")
            {
                car = new Toyota();
                return car;
            }
            else
            {
                return null;
            }
        }
예제 #2
0
        public ICarDealerTask CreateCarDeal(string car_name)
        {
            ICarDealerTask car;

            if (car_name == "Ford")
            {
                car = new Ford();
                return(car);
            }

            if (car_name == "Toyota")
            {
                car = new Toyota();
                return(car);
            }
            else
            {
                return(null);
            }
        }