Ledgend has it that in an ancient and secret monastery, monks are, and have been for countless generations, moving 64 golden disks from one pile to another in accordance with the rules set out at the beginning of the world (given below). When the final move is completed, the world will come to an end. So it is said. For this assignment, you will implement a Java program that solves the Towers of Hanoi problem and graphically displays each step in the solution sequence. You will want to draw upon what you have learned about Frames, drawing graphics, and recursive algorithms.
There are exactly three places, or piles, where disks may be placed. Disks are moved one at a time. The monks moving a disk may only place it on another disk that is larger than the one being placed. Thus, a disk may never be placed on a smaller disk. Obviously, you may not insert a disk into the midst of a pile; disks may only be placed on the top of a pile. The object is to move a pile of disks, one disk at a time using only the three places, from one pile to another without violating the size rule.
Write a Java program (class), TOHViewer, that solves the puzzle for a given number of disks and also animates the solution sequence. In order to support the display of the solution steps, your TOHViewer class should extend java.awt.Frame. Specifically, you must:
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 "HW6". For example, someone with email address "cjones" would create a folder called "cjonesHW6". 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>HW6" will be created. Submit the packaged file for assignment 6 on Eureka.