コード例 #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();
        }
コード例 #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);
        }
コード例 #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();
        }
コード例 #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);
        }
コード例 #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();
        }
コード例 #6
0
ファイル: Program.cs プロジェクト: Gennadii8/ProktIKS
        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);
        }