Esempio n. 1
0
        public Car CarGenerator(Consts.CarType p_carType)
        {
            switch (p_carType)
            {
            case Consts.CarType.Honda: return(new Honda(Color.Red));

            case Consts.CarType.Toyota: return(new Toyota(Color.Blue));

            case Consts.CarType.Mitsubishi: return(new Mitsubishi(Color.Gold));

            default:
                return(new Honda(Color.Red));
            }
        }
Esempio n. 2
0
 public Car(Color p_color, Consts.CarType p_carType)
 {
     Color   = p_color;
     CarType = p_carType;
 }