/*
 * File: InterestingDictionary.java
 * -----------------------
 * An unfinished version of the file that creates an
 * interesting dictionary.
 */

import acm.program.*;

import java.util.*;
import java.io.*;

public class InterestingDictionary extends ConsoleProgram {

	private static final String DICTIONARY = "InterestingDictionary.txt";

	public void run(){
		HashMap<String, String> dict = new HashMap<String, String>();
		
		fillDictionary(dict);
		
		readDefinitions(dict);

	}
	
	private void readDefinitions(HashMap<String, String> dict) {
		// fill this in
	}
	
	private void fillDictionary(HashMap<String, String> dict){
		try {			
			Scanner input = new Scanner(new File(DICTIONARY));
			while(input.hasNextLine()) {
				String word = input.nextLine();
				String definition = input.nextLine();
				dict.put(word, definition);
			}
			input.close();
			
		} catch (IOException ex) {
			println("Couldn't open that dictionary!");
		}
	}


}


