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

Try 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. Refactor the project so reflect a Model/Viewer/Controller architecture. The model in this case is the maze itself, with rooms and halls. The view is the visualization of the model. The controller forms the maze and allows some level of interaction with it. For example, to click the rooms that should be the start and end.

  3. Redesign LockPub and the interfaces that deal with it so that the object that is locked by LockPub is not disclosed outside that class.
    There must be some facility for discovering the order of objects among multiple LockPubs without disclosing the objects that will be locked.
    The redesign must be propagated throughout your project.

  4. 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.

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. Grab a demo sheet.
  2. Upload your project into CMS where it says Lab 3c.
    We are using CMS to grade your lab so you must upload it.
  3. Fill it out before asking for a demo.

Last modified 20:10:56 CST 11 January 2010 by Ron K. Cytron

Last modified 20:10:56 CST 11 January 2010 by Ron K. Cytron