Lecture 10 - Tower of Hanoi - ArrayList

home | previous | next

Classes and Methods


Exercise 10.1

Make the puzzle 'Tower of Hanoi'.

1. Check out what rules the puzzle 'Tower of Hanoi' obeys and how the puzzle works.

2. To make things simple, use numbers as disks and place the numbers horizontally.

3. First, try to make the puzzle with 3 disks.

4. Modifiy the code to have any number of disks.

5. Modify the code to display the numbers vertically.