Ejemplo n.º 1
0
        private bool checkSingleVolumeOfEveryLuggage()
        {
            bool volumeIsEnough = true;

            string debugMessage = String.Format("Dlugosc listy bagazy w TrunkSizeChecker: {0}", luggageList.getLength());

            DebugSupporter.printCustomMessage(debugMessage);

            for (int i = 0; i < luggageList.getLength(); i++)
            {
                volumeIsEnough = volumeIsEnough & checkSingleVolume(luggageList.getLuggage(i));
            }
            return(volumeIsEnough);
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Organizer bagaznika. Wesja 1.0");
            Console.WriteLine("******************************\n");

            Trunk bagaznik = new Trunk(50, 50, 50);

            Console.WriteLine("Bagaznik: {0}\n", bagaznik);

            listaBagazy.addLuggage(new Suitcase(24, 26, 26));
            listaBagazy.addLuggage(new Suitcase(24, 26, 26));

            DebugSupporter.printPropertyValue(nameof(listaBagazy), listaBagazy);
            DebugSupporter.printPropertyValue("listaBagazy.getLength()", listaBagazy.getLength());

            /*
             *          listaBagazy.addLuggage(new Suitcase(10, 50, 70));
             *          listaBagazy.addLuggage(new Suitcase(20, 30, 40));
             *          listaBagazy.addLuggage(new Suitcase(99, 12, 17));
             *          listaBagazy.addLuggage(new Suitcase(51, 14, 13));
             *          listaBagazy.addLuggage(new Suitcase(71, 18, 98));
             *          listaBagazy.addLuggage(new Suitcase(99, 12, 17));
             *          listaBagazy.addLuggage(new Suitcase(51, 99, 13));
             *          listaBagazy.addLuggage(new Suitcase(71, 18, 99));
             */

            LuggageCalc optymalizatorBagaznika = new LuggageCalc(listaBagazy, bagaznik);

            Console.WriteLine("Lista nieposortowana:");
            Console.WriteLine("******************************\n");
            Console.WriteLine(listaBagazy);
        }