Towers of Hanoi: You are given three pegs A, B, and C, and n
squares of varying size. Initially the squares are stacked on peg A in
order of decreasing size, the largest square on the bottom. The
problem is to move the squares from peg A to peg B one at a time in
such a way that no square is ever placed on a smaller square. Peg C
may be used for temporary storage of squares. Write a Java method that
takes n as an argument and outputs the sequence of moves. For example,
here is my output when calling hanoi(3):
move from a to b
move from a to c
move from b to c
move from a to b
move from c to a
move from c to b
move from a to b
For extra extra credit, implement a graphical interface that shows the
pegs and the moves.