Instructions
Maze Project
Project Components
5.3.5

Assignment 12: Final Project

Goals:
  • Learn to implement graph algorithms.

  • Design a complete application with graphics and animation.

Instructions

The names of the classes must be exactly the same as specified. This allows us to run several of your rpogram without special setup steps.

Make sure you follow the style guidelines that WebCAT enforces. For now the most important ones are: using spaces instead of tabs, indenting by 4 characters, following the naming conventions (data type names start with a capital letter, names of fields and methods start with a lower case letter), and having spaces before curly braces.

You will submit this project twice. The preliminary submission will be used for the project reviews. It will give us the opportunity to critique your design and give you suggestions for improvement or changes. This submission is due on April 9th, so we can do the code reviews on April 10th.

The final submission is due at the end of the day on Tuesday, April 15th, the last day of classes.

You may submit as many times as you wish. Be aware of the fact that close to the deadline the WebCAT system may slow down to handle many submissions - so try to finish early.

As with each homework you will also submit your log file named pair-user1-user2.txt where you replace user1 and user2 with the usernames of the two partners.

On top of both files you will have five lines of comments as follows:

// Final project

// partner1-last-name partner1-first-name

// partner1-username

// partner2-last-name partner2-first-name

// partner2-username

(In the text file you do not need the two slashes)

There will be a separate submission for the two parts.

The two submissions will be organized as follows:

Due Dates:

Preliminary submission: Wednesday, April 9th, 11:59 pm.

Final submission: Wednesday, April 16th, 11:59 pm.

Maze Project

Your job is to design the program that finds a path in a rectangular maze of any size, and also designs new mazes. Here are two examples of mazes:

Maze.png

SampleMaze.rtf

The program should have the following features:

You may choose to show the walls without the paths, you may choose to allow the user to view same maze several times in a row, you may allow the user to start a new maze without restarting the program.

You may also keep the score of wrong moves - either for the automatic traversal, or for manual one - and maybe keep statistics on which one of the two algorithms had fewer steps for each maze.

Project Components

You should start your project by designing the structure of the classes you may need and how they relate to each other.

You should use the javalib library for drawing of the maze, and design the animation as steps in the algorithm to be performed on each tick of the clock, or in response to a key (for example the space key.

You can use the JPT library for the design of the user interactions - the selection of the algorithm the origin and the destination, or choosing to design a new maze, but this can also be easily done using the javalib library.

You should probably implement the algorithm in a separate class.

Of course, you need to test everything.

Once you have an idea how your program will be structured, draw a class diagram. Include the class diagram with your first submission.

You will also need to write a user’s guide that tells the user how to control your program and what to expect. It would help to include this with your first submission, but is not required. It is required with the final submission.

Of course, documentation is required for the entire project. Javadoc style is preferred, but if you do not use it, you should still include not only purpose statements for all methods, but also comments that explain the meaning of every field in every class, with the exception of teh Examples class. In Examples class you may have a common comment for several fields that are sample data of the same type.

Optionally, you may add sound effects to your animation.