Project Phase #1 - COMP 303

Detailed Design of command-line simulator

The purpose of this assignment is to complete the detailed design of a command-line version of the ants simulator. The simulator should be able to run a game as specified in section 2.12 of the specification document. The input of the simulator will be four filenames giving three input files containing the description of the red ant, the black ant and the world and one output file for the result.

The simulator must run in two modes, debugging and regular. In debugging mode the simulator produces a dump on stderr of the format described in section 2.13 of the specification document. Debugging mode is triggered by the use of a flag -debug . Your simulator may also support other flags for other sorts of debugging for your own use.

Your Main driver class must be in a package called ant . So typical runs of your simulator would look like:

> java ant.Main redant.txt blackant.txt world1.txt output1.txt

> java ant.Main -debug redant.txt blackant.txt world1.txt output1.txt

Or, if you wanted to run a small sample ant againt itself:

> java ant.Main -debug sampleant.txt sampleant.txt smallworld.txt smallouput.txt

The input format of the files is defined in the specifications document. The output file should be in exactly this format:

Food collected by red ants:   xxxxxxxxxxx
Food collected by black ants: xxxxxxxxxxx 

What to hand-in

  1. Your design depicted using appropriate UML diagrams.
  2. Any other description of your design that you think is relevant, given as text or any other format you believe adds to your design document.
  3. A brief discussion of problems you have encountered so far and any progress you have made to towards Phases 2-5.
  4. The html generated using javadoc for your skeleton implementation matching your design. You do not need any of the actual implemementation, just the skeleton and appropriate comments.
  5. The build.xml file needed for your project to date (this may only include the javadoc process (or more, if you have done more).
You should hand in a hardcopy for questions 1, 2 and 3. In addition, you should e-mail to the TA a file YourLastname.jar file which has the following directory structure.
           build.xml   build file for  ant  
           bin/        any scripts you have developed 
           classes/    where your generated classes go 
           design/     any online design documentation 
           doc/        where your generated javadoc html goes  
           lib/        where generated .jar files go 
           src/        java/aspectj/junit source files for your project 
                          (organized into a good package structure) 
You can create a clean directory (that does not have the hidden svn files) using:
  svn export YourSVNWorkingDirectory YourLastName 
to export a clean copy of your project to a directory called YourLastName.

You can create the jar file by using:

   jar -cvf YourLastName.jar YourLastName 
to create the jar file to send to the TA.