No, not the towers in Middle Earth. Nor the ones in Hanoi. You will find the background and considerably helpful suggestions and hints in your text, Section 8.7 Laboratory: Tho Two-Towers Problem
However, pay attention to the instructions given here as I am superseding a number of the requirements. (Remember my suggestions for success -- "follow instructions".) Even if you perfectly implement the problem as specified in the book, you will lose credit if you do not attend to the modifications to the instructions given below. The SubsetIterator class you write should use generics and generic Vectors. You will actually use a specific type of Vector, perhaps doubles but I'm not saying; however, your SubsetIterator should take a generic Vector and return subsets one at a time.
Follow the instructions given in the text on pages 175-177 except as follows:
With your SubsetIterator class in hand, write a program (another class called TwoTowers) that solves the Two-Towers problem. Note: in order to support the solution of the problem, you will probably want to write additional methods besides the ones prescribed above. For example, you might want a method that computes the sum of the contents of a Vector. It is sufficient for your solution to print out the box sizes in the two partitions, together with their respective sums and a total difference between the two towers.
Update 1.1: Note that the textbook states that units for the fifteen-block example are tenths of an inch. Given that manipulating a block that has an area of one tenth of a square inch would be completely impractical, we will interpret units as inches. Correspondingly, the second best solution -- the one shown above -- has an error of 129 hundred-thousandths of an inch -- NOT millionths. Keep this in mind as you test your program and evaluate the solutions it finds.
I want all of you to at least consider the "Thought Questions" found at the end of the project in your text. I intend to assign either a lab or a homework that is related to the thought questions of this project so I want you to have thought about the issues.
[optional] If you implement (and test and document) the randomSubset() method and use it to generate an approximate solution, you will get extra credit.
Do not forget to use the javadoc constructs for your documentation and include the html file produced by the javadoc tool in your final submission. Make sure that you create a folder named with your Westmont email name followed by "HW7". For example, someone with email address "cjones" would create a folder called "cjonesHW7". Make sure that inside that folder you have: for both parts of the assignment, java source files and html documentation files resulting from javadoc. Finally, either tar or zip the folder so that when we extract it, the folder "<emailname>HW7" will be created. Submit the packaged file for assignment 7 on Eureka.