CSC 7000 - Algorithms and Programming

Project #9

Reports Due Monday, April 22, 2002

For this project you will implement stacks and queues and compare their use in solving mazes. Use the maze implementation given in pp 149-151 of Java Structures. This maze implementation can work both with stacks and queues. You can use one of the stack implementations given in the text. For the queues you should experiment with two different implementations:

  1. The QueueArray implementation given in p145-148
  2. An alternative QueueArray2 implementation that uses head and tail and queueEmpty as described under option 1 at the bottom of page 148.

The objective of this project is to gain some familiarity with stacks and queues and to see how the maze traversal is affected by the choice of data structure used. For this you need to experiment with several different mazes and observe which parts of the mazes get explored by the maze program depending on whether a stack or a queue is being used. (The different implementation of queues should have no effect, of course.)

In the report include