Exemplo n.º 1
0
        static void Main()
        {
            TransportCompany taxiCompany    = new TaxiTransCom("зеленоглазое такси");
            TransportService companyService = taxiCompany.Create("Такси", 2);

            double distance = 13.5;

            printInfo(companyService, distance);

            TransportCompany shippingCompany = new ShipTransCom("доставочка");

            companyService = shippingCompany.Create("Тяжкий груз", 3);

            distance = 135.7;
            printInfo(companyService, distance);

            TransportCompany drunkDriverCompany = new DrunkTransCom("Пьяный водитель");

            companyService = drunkDriverCompany.Create("Стакановец", 25);

            distance = 135.7;
            printInfo(companyService, distance);

            Console.ReadLine();
        }
Exemplo n.º 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 DrunkedTaxi = new DrunkAndTax("Drunk&Tax");

            compService = DrunkedTaxi.Create("Пьяное такси", 4);
            Print(compService, 200);
        }
Exemplo n.º 3
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 sCom = new SoberTransCom("Компания Трезвый водитель");

            compService = sCom.Create("Услуга Трезвый водитель", 3);
            dist        = 100;
            Print(compService, dist);
            Console.Read();
        }
Exemplo n.º 4
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 drCom = new DrunkDriverTransCom("Служба пьяный водитель");

            compService = drCom.Create("Пьяный водитель", 3);
            double distdr = 200.0;

            Print(compService, distdr);
        }
Exemplo n.º 5
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);
            Console.ReadKey();

            TransportCompany DTC = new DrunkTransCom("Приехать забрать");

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

            Print(compService, distance);
            Console.ReadKey();
        }
Exemplo n.º 6
0
        static void Main(string[] args)
        {
            TransportCompany trCom       = new TaxiTransCom("Taxi Service");
            TransportService compService = trCom.Create("Taxi", 1);

            double dist = 15.5;

            Print(compService, dist);

            TransportCompany gCom = new ShipTransCom("Shipping Service");

            compService = gCom.Create("Shipping", 2);

            double distg = 150.5;

            Print(compService, distg);

            TransportCompany alcCom = new AlcDriverCom("Drunk driver");

            compService = alcCom.Create("Drunk driver", 3);
            double distal = 80.5;

            Print(compService, distal);
        }