Java Reference
In-Depth Information
In this queue implementation, when the queue is full, an attempt to store another ele-
ment causes a new underlying array to be allocated that is twice as large as the ori-
ginal, the current contents of the queue are copied into this array, and a reference to
the new array is stored in
q
.
6.
To demonstrate the three
ICharQ
implementations, enter the following class into
IQDemo.java
. It uses an
ICharQ
reference to access all three queues.