/*
 * File: CountingWords.java
 * -----------------------
 * An unfinished version of the file that counts words.
 */

import acm.program.*;

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

public class CountingWords extends ConsoleProgram {

	private static final String TEXT = "text.txt";

	public void run(){
		HashMap<String, Integer> wordCount = new HashMap<String, Integer>();
		
		fillDictionary(wordCount);
		
		printWordCount(wordCount, 40);

	}
	
	private void printWordCount(HashMap<String, Integer> wordCount, int threshhold) { 
		// fill this in
	}
	
	private void fillDictionary(HashMap<String, Integer> wordCount){
		try {			
			Scanner input = new Scanner(new File(TEXT));
			while(input.hasNext()) {
				String token = input.next();
				// fill this in
			}
			input.close();
			
		} catch (IOException ex) {
			println("Couldn't open that file!");
		}
	}


}


