/** * WordWithCount.java * * A potentially handy class for the word-counting assignment due 11/1/05. * * @author Jeff Ondich * @version 10/26/05 */ public class WordWithCount { public String word; public int count; /** * Using this constructor, it's easy to create * a (word,count) pair with the specified string and * an initial count of 1. The first time you see a * given word, you'll want to instantiate one of these * (using "new WordWithCount( word )") and add it to your * ArrayList. */ public WordWithCount( String s ) { word = s; count = 1; } }