!7 cmodule CurrentTimeDialog > DynSayAndInputBot { class Bot extends AbstractSayAndInputBot2 implements Runnable { class DoItAgain extends Attractor { bool matches(S s) { ret matchX2("do it again|again|another time", s); } public void run { sayTime(); } } class WhatsTheTime extends Attractor { bool matches(S s) { ret matchX2("what's the time|tell me the time|time", s); } public void run { sayTime(); } } public void run { say("Do you want to know the current time?"); if (yes()) sayTime(); else say("OK"); } void sayTime { say("It is " + localTime_24()); addAttractors(new DoItAgain, new WhatsTheTime); } } Bot makeBot() { ret new Bot; } }