// QueueInheritanceTest.java
// Class QueueInheritanceTest.
package chapter35;

public class QueueInheritanceTest
{
    public static void main( String args[] )
    {
        QueueInheritance queue = new QueueInheritance();

        // use enqueue method
        queue.enqueue( -1 );
        queue.print();
        queue.enqueue( 0 );
        queue.print();
        queue.enqueue( 1 );
        queue.print();
        queue.enqueue( 5 );
        queue.print();

        // remove objects from queue
        Object removedObject = null;

        removedObject = queue.dequeue(); // use dequeue method
        System.out.printf( "%s dequeued\n", removedObject );
        queue.print();

        removedObject = queue.dequeue(); // use dequeue method
        System.out.printf( "%s dequeued\n", removedObject );
        queue.print();

    } // end main
} // end class QueueInheritanceTest
