Grading Criteria
Automated Tests
For transparency’s sake, below is a list of aspects of your code the automated tests will check. Your code will still be checked by a TA, and passing all these tests does not guarantee a perfect grade. Make sure you follow the conventions for isOpen and isFull in PercolationDFS and PercolationUF outlined in this writeup. We test your IPercolate implementations by seeing if they produce the same grid ours do, so if yours differ from ours you will fail many tests.
- Do PercolationDFS and PercolationUF's isOpen, isFull, and percolates methods return the expected values?
- Do PercolationDFS and PercolationUF handle out of bounds calls correctly?
- Do PercolationDFS and PercolationUF run percolation simulations correctly?
- Do PercolationDFS and PercolationUF work with small N?
- Do PercolationDFS and PercolationUF accept calls to open/isOpen/isFull/percolates after percolation occurs?
- Do PercolationDFS and PercolationUF use unnecessary static variables?
- Do PercolationDFS and PercolationUF handle the longest possible simulation correctly? (percolation only occurring after close to N2 opens)
- Do PercolationDFS and PercolationUF handle calls to methods in a random order correctly? (will not pass if any of your methods besides open() change values in the grid, for example)
- Do PercolationDFS and PercolationUF handle backwash correctly? (UF handling backwash is for extra credit, you can still get full credit if PercolationUF produces backwash)
- Does a trial of PercolationUF make a reasonable number of calls to the methods in the IUnionFind object?
- Does PercolationUF make a constant number of calls to IUnionFind per call to each of its methods, regardless of what N is?
- Does PercolationUF achieve a reasonable order of growth when using an optimized IUnionFind object?
In addition to the automated tests, we will
- time your IPercolate implementations,
- test whether your PercolationVisualizer draws the grid correctly for
both implementations, and
- run your PercolationStats to see if it produces the correct results.
Grading Breakdown
This assignment is worth 40 points.
- 60% Correctness: for your implementation of
PercolationDFS, PercolationUF, PercolationVisualizer, QuickUWPC, and
PercolationStats and passing the tests described above.
- 25% Analysis: for your README, answers to the
questions, and description of the tradeoffs.
- 15% Engineering: for your the structure and style of
your IPercolate implementations. Is your code inefficient? For example, is
the time required for percolates or open for PercolationUF proportional to
N? Do you
appropriately use decomposition to avoid duplicate code in
PercolationVisualizer and PercolationStats?
</ul>