/* * Created on Mar 31, 2005 */ package SimpleSpeller; /** Starter code for testing the Spell Checker */ public class TestSpellChecker { /** 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 MYSPELLCHECKER CLASS. * or * TEST FOUND PROBLEMS WITH MYSPELLCHECKER 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) { /* 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); String testword = "CAT"; String ncat = speller.normalize(testword); boolean result = speller.isCorrectlySpelled(testword); /* You take it from here... You can and should add code below here. */ } }