Exemple #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;
            }
        }
Exemple #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);
            }
        }