Sale!

CSC 220 Program #6: Tree Solved

Original price was: $40.00.Current price is: $35.00. $29.75

Category:

Description

5/5 - (1 vote)

For this assignment, I want you to create and submit a Tree.java file in which you implement a tree class.
1. For this assignment you will be provided with four files.
• TreeTest.java contains the main function. You may NOT modify this file. It
creates Tree objects and tests them in multiple ways.
• Tree.java is the template that you may edit to create your class. It contains
public and private functions that need to be implemented correctly in order to
get the expected output.
• Node.java is a file containing the Node class. Your binary tree in Tree.java
makes use of the Node objects created from this class. You would be advised to
look over it and make yourself familiar with the fields and functions it has.
• TreeTest.out contains the output from my implementation of the Tree class.
You would be wise to ensure that your output is EXACTLY the same as mine
(i.e. including spacing and formatting)
2. Please note the helpful comments scattered throughout the code (in all three .java
files). In many cases they provide hints and identify what not to do.
3. Please maintain the names of the different files. You will only be required to submit
Tree.java.
4. While there are a lot of public and private functions in Tree.java, only the public
functions will be tested. Feel free to add or remove as many private functions as you
think you’ll need. The private functions currently in Tree.java are only suggestions.
5. Compiling TreeTest.java should automatically make use of your Tree.java file,
which in turn should automatically use the Node.java file (assuming they are all in
the same directory).
6. While executing the program, feel free to redirect the output to a file of your choosing,
and then compare that file with my output file to see any differences.
7. For example, once completed, the three commands below should NOT produce any
output.
Linux: Windows:
javac TreeTest.java
java TreeTest > myOutput
diff TreeTest.out myOutput
javac TreeTest.java
java TreeTest > myOutput
fc TreeTest.out myOutput