CSE 132 (Spring 2010)
Lab 3c: Mazes Finale

Apply this change to your code (I sent email about this):
In the demo() method of the Maze class, move the call to initMaze() inside the loop, so the maze resets each time. Run your code and make sure things work. Commit.

Try this MapManager.java if you see concurrent mod exceptions on the lock management.

All groups must do the following, which will earn each member no better than a B for this lab grade:
To earn an A, you must additionally complete any one of the following (if you do more than one, extra credit is possible; talk with the instructor before proceeding):
  1. Write the method in Maze: findCheese(Room start, Room end). The "mouse" starts in room start and should eventually find the cheese in room end. The path between start and end should be highlighted (using HallViz). You can assume the maze is correct in the sense that all Rooms are connected and there are no cycles.
    Hint: you should think about doing most of the work in Room with a helper method.

  2. Add methods to the RWLock class that acquire locks with a timeout feature and return true if the lock was obtained and false if there was a timeout and no lock was obtained. Use the time-out locks in your project and describe the impact the locks have on performance.
    Experiment with timeout values.
  3. Develop a fair RWLock implementation, as discussed in class. You must document how it is more fair.

Demo and submission

The code you hand in should be as clean and simple as possible. Don't duplicate code unnecessarily. Don't use .equals where == suffices. You can earn a C for a lab that works but is very poorly written. To get an A on this lab, your code must show that you know what you are doing. A B will be awarded to labs that fall in between.
  1. Be sure your code is committed.
  2. When ready and you have your code committed, demo your project to a TA and be sure you are listed on the TA demo sheet.

Last modified 08:59:23 CDT 03 June 2010 by Ron K. Cytron