01: import java.util.Scanner;
02: 
03: /**
04:    This program tests the countSyllables method of the Word class.
05: */
06: public class WordTester
07: {  
08:    public static void main(String[] args)
09:    {  
10:       Scanner in = new Scanner(System.in);
11: 
12:       System.out.println("Enter a sentence ending in a period.");
13: 
14:       String input; 
15:       do
16:       {
17:          input = in.next();
18:          Word w = new Word(input);
19:          int syllables = w.countSyllables();
20:          System.out.println("Syllables in " + input + ": " 
21:             + syllables);
22:       } 
23:       while (!input.endsWith("."));
24:    }
25: }