/* * Created on Mar 31, 2005 */ package SimpleSpeller; /** Starter code for testing the document. */ public class TestDocument { /** You can structure the method as you like. However, at the end of * its execution, it should display one of the following two messages * on the console: * TESTER FOUND NO PROBLEMS FOUND WITH MYDOCUMENT CLASS. * or * TEST FOUND PROBLEMS WITH MYDOCUMENT CLASS. * In the latter case, there should be something earlier on the console * calling attention to what the error it. * @param args */ public static void main(String[] args) { //Just a possible start ... /* DON'T CHANGE ANY OF THE FOLLOWING LINES * SERVES AS A CHECK THAT THE NAMES AND PACKAGING ARE RIGHT. * IF THIS DOESN'T COMPILE AS-IS, SOMETHING IS WRONG. */ String[] correctWords = {"cat", "dog", "gerbil", "guppy", "dont" + "stop" + "at" + "this"}; SimpleSpeller.ISpellChecker speller = new SimpleSpeller.MySpellChecker(correctWords); SimpleSpeller.IDocument doc = new SimpleSpeller.MyDocument(speller); String teensy = "A teensy, woefully inadequate, " + " completely pathetic little tiny document. " + " If this is all you test with, your grade will likewise " + " be teensy, woefully inadequate, etc.."; doc.open(teensy); doc.print(); /* You take it from here... You can and should add code below here to test your implementations. */ } }