Queue (Bounded Buffer) Demonstration Program
Items are added to the head or tail and removed from the head
or tail of a queue implemented as a bounded buffer.
-
An item can be inserted into the slot next to the one currently being pointed
to by the head or tail pointer if that slot is empty.
-
The item in the slot being pointed to by the head or tail
pointer can be removed if that slot is not empty.
-
You may just press the Step button when the applet is started
without providing any command sequence.
-
You can also provide
a sequence of add, addH,
remove, and removeT commands as
add 201 add 202 remove addH 203 removeT add 204 addH 205 removeT remove.
Source Code of the Queue Program
Source Code of the QueueG Program (Graphical Version)
Jacob's CS 261 Demos
Jacob's CS 261 Home