Except where noted, these are to be turned in as hard copy. You can write solutions out by hand, or write them on your computer and print them.
Papers must not have ragged, spiral-notebook edges. Multiple page solutions must be stapled. Solutions not following these guidelines will be returned ungraded. I regret this rigidity, but it is necessary given the number of students in CSSE 230 this term.
Late days may not be used for written assignments.
java.util.Map
to complete this problem.
(30 points) Complete the non-attacking queens problem as discussed in class during Session 16. The template code for this project is in your individual SVN repository as the
Queens
project. There are three methods for you to implement, all in
RealQueen
and all indicated by
TODO
comments.
You will probably need to study the javadocs of
Queen
and
RealQueen
to solve this problem.
Two forms of test code are provided. The
Main
class includes a
main
method that you can use while working on your solution and debugging. The
MainTest
class contains unit tests that we will use to check your solution.
You must pass the unit tests to earn the correctness points for this problem.
Be sure to commit your solution to SVN for grading.
(20 points) For this task you’ll add four more methods to the Threaded Binary Search Tree project. Check out the new template code given in
ThreadedTree2
in your individual SVN repository. (Because of the extended deadline on the original Threaded assignment, the template code for this one will not be available until Wednesday of week 6.)
The methods you are to write are the last two methods in
ThreadedBinaryNode
and the last two in
ThreadedBinarySearchTree
. Near the end of
ThreadedBinarySearchTree
, you’ll find a couple of new methods that illustrate the use of the methods you will write. The code in the JUnit tests in
ThreadedTree2Test.java
should also help you to understand how your methods should work.
Your code, which you should commit to your repository, should pass all of the unit tests in
ThreadedTree2Test.java
, plus the other unit tests that are already passed by the template code. That is, don’t break the existing code while adding your code. In Eclipse 3.4, you can right-click a project to run all the JUnit tests in the entire project. That’s how we’ll test your solution.
(30 points) Consider the following directed graph: