@@ -0,0 +1,1372 @@
+%0Aimport java.io.File;%0Aimport java.io.FileNotFoundException;%0Aimport java.io.PrintStream;%0Aimport java.util.ArrayList;%0Aimport java.util.Collections;%0Aimport java.util.List;%0Aimport java.util.Scanner;%0A%0Apublic class AnagramMain %7B%0A%0A%09// To be able to test with a Junit file%0A%09public static Scanner console = new Scanner(System.in);%0A%0A%09public static PrintStream out = System.out;%0A%0A%09public static void main(String%5B%5D args) throws FileNotFoundException %7B%0A%09%09out.println(%22Welcome to the csc143 anagram solver.%22);%0A%09%09out.println();%0A%0A%09%09// open the dictionary file%0A%09%09out.print(%22What is the name of the dictionary file? %22);%0A%09%09Scanner input = new Scanner(new File(console.nextLine()));%0A%0A%09%09// read dictionary into an ArrayList%0A%09%09List%3CString%3E dictionary = new ArrayList%3CString%3E();%0A%09%09while (input.hasNextLine()) %7B%0A%09%09%09dictionary.add(input.nextLine());%0A%09%09%7D%0A%0A%09%09// solve anagrams%0A%09%09List%3CString%3E dictionary2 = Collections.unmodifiableList(dictionary);%0A%09%09AnagramSolver solver = new AnagramSolver(dictionary2);%0A%09%09String phrase;%0A%09%09do %7B%0A%09%09%09out.println();%0A%09%09%09out.print(%22phrase to scramble (return to quit)? %22);%0A%09%09%09phrase = console.nextLine();%0A%09%09%09if (phrase.length() != 0) %7B%0A%09%09%09%09out.print(%22Max words to include (0 for no max)? %22);%0A%09%09%09%09int max = console.nextInt();%0A%09%09%09%09console.nextLine(); // to skip newline after int%0A%09%09%09%09solver.print(phrase, max);%0A%09%09%09%7D%0A%09%09%7D while (phrase.length() %3E 0);%0A%0A%09%09input.close();%0A%09%7D%0A%7D%0A

Create AnagramMain.java