AP Computer Science --- Haas --- RecursiveHanoi

Complete the code below prints the solution to the tower of Hanoi puzzle.




/**
 * prints the solution for a tower of Hanoi puzzle
 * of height n
 */
public class RecursiveHanoi {
  public static void movetower( int height, int from, int to, int using ) {
    if(height == 1) {
      System.out.println("MOVE: "+ from + "->" + to );
    }
    else {
      movetower( <<< COMPLETE THE CODE >>>> );
      System.out.println("MOVE: "+ from + "->" + to );
      movetower(  <<< COMPLETE THE CODE >>>>  );
    }
  }

  public static void main( String argv[] ) {
    int numberOfDisks = 3;
    movetower( numberOfDisks, 1, 3, 2 );
  }
}