I just got a wrong number by a 10 year old. Here was the entire conversation
Ed: Hello!
Kid: [background noise, voices]
Ed: Hello?
Kid: [pause] Hello?
Ed: Who's calling?
Kid: Is Ross there?
Ed: You have the wrong number.
Kid: [pause] Hello?
Ed: [angry] Hello?!
Ed's coworkers: [laughter]
Kid: Is Ross there?
Ed: You have the wrong number.
Kid: [background noises, voices]
Ed: [hangs up]
So I wrote a function to emulate his behavior:
public boolean IsRossThere() {
string greeting = "Hello?";
string query = "Is Ross There?";
Phone.Say(greeting);
If (Phone.Hear(anything) == True) {
Phone.Say(query);
If (Phone.Hear(yes) == false) {
return this.IsRossThere();
}
Else {
return true;
}
}
}
No comments:
Post a Comment