Write a Java class that implements the FirstChildNextSiblingTree interface by adapting the LinkedBinaryTree implementation of a binary tree as discussed in the textbook and provided as part of the net.datastructures package. Your implementation class must be named LinkedFCNSTree so that my testing class will correctly call your implementation of the FirstChildNextSiblingTree interface, and both the interface and your implementation should be part of the first_child_next_sibling package.
The source code for a number of Java interface and exception definitions are provided for your convenience, along with the LinkedBinaryTree and other implementation classes, in the net.datastructures package. You should be able to import the package into an Eclipse project by importing it as an archive.
One way of implementing a general tree using a first-child next-sibling implementation is to write your implementation as an adapter that delegates much of its work to the LinkedBinaryTree class. Create a local attribute of type LinkedBinaryTree and implement as much as you can of the FirstChildNextSiblingTree interface by delegating the work to the binary tree.
Please hand in a hardcopy listing of your solution to this assignment (to ensure that the formatting which you carefully prepared is preserved) and submit the source for your solution using the following form. You may submit a solution multiple times if you wish to correct errors in previous submissions. Your last submissions will be accepted for grading.
Assignments will be accepted after the due date and time, but late submissions will be assessed a penalty of 1% per hour or portion of an hour.
Your assignment submissions are password-protected. These passwords apply only to form data submitted via the Web server. They are separate from (and typically different from) your network password or the password for your Unix account. To change your Web password, press the following button:
Copyright © 2005 Jonathan Mohr