// Fig. 11.12: QueueInheritance.java // Class QueueInheritance definition // Derived from List package com.deitel.jhtp2.ch17; public class QueueInheritance extends List { public QueueInheritance() { super( "queue" ); } public synchronized void enqueue( Object o ) { insertAtBack( o ); } public synchronized Object dequeue() throws EmptyListException { return removeFromFront(); } public boolean isEmpty() { return super.isEmpty(); } public void print() { super.print(); } }