CSC232: Introduction to CS II
Homework Assignment # 6
Due: Beginning of class on Monday, April 25, 2011.
Modify the BinaryTree class to add a method called bft that implements the breadth-first traversal algorithm of a binary tree as described in Programming Project 6 page 357 of the textbook. The method returns the result of the traversal as a sequence of strings separated by spaces. Use the method readBinaryTree to read the binary tree from a text file. Prompt the user for the name of the input file.
The name of your program must remain BinaryTree.java. Your added code will appear only in the main method and in the bft method(s). Make sure to write these methods at the beginning of the BinaryTree class. Make sure to upload an electronic copy of the source file on your csc232 eccentric upload folder in a folder called HW\hw6. Also make sure to turn in a stapled hard copy of only the code you added. Please remember to write your name and the name of your eccentric upload folder on the hard copy.