Пример #1
0
        private static void QueTest_Double()/*The method that instantiates an double queue,
                                             * displays items, the last node value, and the minimum value in the queue.*/
        {
            QueueInheritance <double> doubleQueue = new QueueInheritance <double>();

            for (int i = 0; i < doubleArray().Length; i++)
            {
                doubleQueue.Enqueue(doubleArray()[i]);
            }
            doubleQueue.Display();
            Console.WriteLine($"The last value of this que is {doubleQueue.GetLastNode()}");
            Console.WriteLine($"The minimum value of this que is {doubleQueue.Minimum()}");
        }
Пример #2
0
        private static void QueTest_Integer()/*The method that instantiates an integer queue,
                                              * displays items, the last node value, and the minimum value in the queue.*/
        {
            QueueInheritance <int> intQueue = new QueueInheritance <int>();

            for (int i = 0; i < intArray().Length; i++)
            {
                intQueue.Enqueue(intArray()[i]);
            }
            intQueue.Display();
            Console.WriteLine($"The last value of this que is {intQueue.GetLastNode()}");
            Console.WriteLine($"The minimum value of this que is {intQueue.Minimum()}");
        }