    // Collect an arbitrary number of callers to a radio show phone-in
    // competition. Then randomly select one as the prize winner.
class RadioShowMain {
    public static void main(String[] args){
        // Read the names of users.
        SimpleInput keyboard = new SimpleInput();
        // Read names until `end' is typed.
        final String endMarker = "end";

        // Collect callers to a particular program.
        RadioShow show = new RadioShow("Win with Walter");

        System.out.println("Give the callers' names. Finish with "+endMarker);
        // Read the first name.
        String name = keyboard.nextWord();
        while(!name.equalsIgnoreCase(endMarker)){
            show.addCaller(name);
            name = keyboard.nextWord();
        }

        // Report how many there are.
        int howMany = show.numCallers();
        System.out.println("There are: "+howMany+" callers to "+
                           show.getProgramme());
        // Randomly select a winner.
        int which = (int) (Math.random()*howMany);
        System.out.println(show.selectCaller(which)+" is the winner.");
    }
}
