8 puzzle JAVA

Sam k5
message1.txt

import java.io.*; import java.util.*; // 8 puzzle program public class xxxxx8puz { //class variables //use prt for System.out to save typing PrintStream prt = System.out; //Print Graph Matrix private void prtStates(int cur[], int nxt[], String mov){ int j, k, m, n; // Print Graph matrix prt.printf("\n\tFrom cur state to nxt state using %s move:\n\t", mov); for (j = 0; j < 3; j++){ m = j * 3; n = m + 3; for (k = m; k < n; k++) prt.printf("%3d", cur[k]); //end for k =m prt.printf("\t"); for (k = m; k < n; k++) prt.printf("%3d", nxt[k]); //end for k =m prt.printf("\n\t"); } //end for j =1 } // end prtStates // 8-puuzle from current sate to goal state private void puzzle(int cs[], int gs[]){ //complete this method } // end puzzle private void process(String fn) { // read input int cs[], gs[]; //initial and goal state int i, j, n; long start, end; prt.printf("\n\t8 Puzzle program:"+ "\n\tThis method reads initial state and goal state from inputfile"+ "\n\tand prints all the moves from initial state to goal state."+ "\n\t\tTo compile: javac xxxxx8puz.java" + "\n\t\tTo execute: java xxxxx8puz inputfilename"+ "\n\t\t Example: java xxxxx8puz inputfilename"); //Allocate space for initial and goal states cs = new int[9]; gs = new int[9]; try{ // open input file Scanner inf = new Scanner(new File(fn)); n = inf.nextInt();//read no. of cases // read initial and goal states for (i = 1; i <= n; i++){ // read current state for (j = 0; j <= 8; j++) cs[j]= inf.nextInt(); // end for j // read goal state for (j = 0; j <= 8; j++) gs[j]= inf.nextInt(); // end for j //initial state and goal state prtStates(cs, gs, "??"); //Get System Time start = System.currentTimeMillis(); puzzle(cs, gs); //Get System Time end = System.currentTimeMillis(); prt.printf("\n\tExec Time: %d ms", end - start); } // end for i // close input file inf.close(); }catch(IOException e) {prt.printf("\nI/O Error %s", e );} } // end process method public static void main(String[] args) throws Exception{ int cnt = args.length; // get no. of arguments String fn; if (cnt < 1){ System.out.printf("\n\tOOOPS Invalid No. of aguments!"+ "\n\tTO Execute: java xxxxx8puz inputfilename"); return; } // end if // get input file name fn = args[0]; // create an instance of xxxxx8puz class xxxxx8puz g = new xxxxx8puz (); // call process method g.process(fn); //Replace ????????? with your name in next line System.out.printf("\n\n\tAuthor: ????????? Date: %s\n", java.time.LocalDate.now()); } // end main } // end xxxxx8puz /*Sample 8-puzzle input 3 1 3 2 5 0 4 8 7 6 1 3 2 5 7 4 8 6 0 1 5 2 0 8 6 3 7 4 1 2 3 4 5 0 8 7 6 1 3 2 5 0 4 8 7 6 0 1 3 2 5 7 4 6 8 */