Exemplo n.º 1
0
        public ITransportable Create(TransporterType type)
        {
            ITransportable transport = null;

            switch (type)
            {
            case TransporterType.Bus:
                transport = new TransportByBus();
                break;

            case TransporterType.Bike:
                transport = new TransportByBike();
                break;
            }
            return(transport);
        }
Exemplo n.º 2
0
 private void myInitType(TransporterType type)
 {
     Type = type;
 }