Write an application or applet that animates the solution to the Towers of Hanoi problem. The problem asks you to move n disks from one pole to another, one at a time. You move only the top disk on a pole, and you place a disk only on top of larger disks on a pole. Since each disk has certain characteristics, such as its size, it is natural to define a class of disks. Design and implement an ADT tower that includes the following operations:
Add a disk to the top of the disks on the pole
Remove the topmost disk Also,
design and implement a class that includes a recursive method to solve the problem.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here