Example #1
0
        public static void Main(string[] args)
        {
            TransportCompany trCom       = new TaxiTransCom("Служба такси");
            TransportService compService = trCom.Create("Такси", 1);
            double           dist        = 15.5;

            Print(compService, dist);

            TransportCompany gCom = new ShipTransCom("Служба перевозок");

            compService = gCom.Create("Грузоперевозки", 2);

            double distg = 150.5;

            Print(compService, distg);

            Console.ReadKey(true);
        }
Example #2
0
        static void Main(string[] args)
        {
            TransportCompany trCom       = new TaxiTransCom("Служба такси");
            TransportService compService = trCom.Create("Такси", 1);
            double           dist        = 15.5;

            Print(compService, dist);

            TransportCompany gCom = new ShipTransCom("Служба перевозок");

            compService = gCom.Create("Грузоперевозки", 2);
            double distg = 150.5;

            Print(compService, distg);

            TransportCompany dCom = new DrunkTransCom("Служба пьяный водитель");

            compService = dCom.Create("Пьяный водитель", 4);
            double t = 2.5;

            Print(compService, t);

            Console.ReadKey();
        }