/*
 * File: HangmanLexicon.java
 * -------------------------
 * This file contains a stub implementation of the HangmanLexicon
 * class that you will reimplement for Part III of the assignment.
 */

import acm.util.*;

public class HangmanLexicon {

/** Returns the number of words in the lexicon. */
	public int getWordCount() {
		return 10;
	}

/** Returns the word at the specified index. */
	public String getWord(int index) {
		switch (index) {
			case 0: return "BUOY";
			case 1: return "COMPUTER";
			case 2: return "CONNOISSEUR";
			case 3: return "DEHYDRATE";
			case 4: return "FUZZY";
			case 5: return "HUBBUB";
			case 6: return "KEYHOLE";
			case 7: return "QUAGMIRE";
			case 8: return "SLITHER";
			case 9: return "ZIRCON";
			default: throw new ErrorException("getWord: Illegal index");
		}
	};
}

@@ -196,28 +196,8 @@
 */%0A%0A
-import acm.util.*;%0A%0A
 publ
@@ -222,17 +222,20 @@
 xicon %7B%0A
-%0A
+    
 /** Retu
@@ -273,25 +273,28 @@
 lexicon. */%0A
-%09
+    
 public int g
@@ -309,18 +309,24 @@
 unt() %7B%0A
-%09%09
+        
 return 1
@@ -332,14 +332,28 @@
 10;%0A
-%09%7D%0A%0A/*
+    %7D%0A%0A    /**%0A     
 * Re
@@ -394,369 +394,620 @@
 dex.
- */%0A%09public String getWord(int index) %7B%0A%09%09switch (index) %7B%0A%09%09%09case 0: return %22BUOY%22;%0A%09%09%09case 1: return %22COMPUTER%22;%0A%09%09%09case 2: return %22CONNOISSEUR%22;%0A%09%09%09case 3: return %22DEHYDRATE%22;%0A%09%09%09case 4: return %22FUZZY%22;%0A%09%09%09case 5: return %22HUBBUB%22;%0A%09%09%09case 6: return %22KEYHOLE%22;%0A%09%09%09case 7: return %22QUAGMIRE%22;%0A%09%09%09case 8: return %22SLITHER%22;%0A%09%09%09case 9: return %22ZIRCON%22;%0A%09%09%09default:
+%0A     * %0A     * @throws Exception%0A     */%0A    public String getWord(int index) throws Exception %7B%0A        switch (index) %7B%0A        case 0:%0A            return %22BUOY%22;%0A        case 1:%0A            return %22COMPUTER%22;%0A        case 2:%0A            return %22CONNOISSEUR%22;%0A        case 3:%0A            return %22DEHYDRATE%22;%0A        case 4:%0A            return %22FUZZY%22;%0A        case 5:%0A            return %22HUBBUB%22;%0A        case 6:%0A            return %22KEYHOLE%22;%0A        case 7:%0A            return %22QUAGMIRE%22;%0A        case 8:%0A            return %22SLITHER%22;%0A        case 9:%0A            return %22ZIRCON%22;%0A        default:%0A           
  thr
@@ -1017,13 +1017,8 @@
 new 
-Error
 Exce
@@ -1054,13 +1054,22 @@
 %22);%0A
-%09%09%7D%0A%09
+        %7D%0A    
 %7D;%0A%7D

Remove ACM from HangmanLexicon