Try chatting how does the behavior compare to version 4 of


  1. Try chatting. How does the behavior compare to version 4 of Magpie:
  2. At the bottom of the Magpie5 Lab find the code:

private String [] randomResponses = {"Interesting, tell me more", "Hmmm.",

"Do you really think so?",

"You don't say." };

This array of Strings holds the responses the ChatBot randomly says. Add two more random responses and compile, then run the runner for Magpie5.

  1. Look at the getRandomResponse method in the Magpie5 Lab and compare it to the same method in the getRandomResponse method in Magpie4. Compare and contrast how the two methods work.
  2. Let's say you wanted to increase the number of random responses to 30 different phrases. Which of the two methods, the one in Magpie 4 or Magpie5, would be most efficient? Why?
  3. How does storing the responses in array enable increasing the number of random responses the Magpie ChatBot can use?

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Try chatting how does the behavior compare to version 4 of
Reference No:- TGS02644087

Now Priced at $20 (50% Discount)

Recommended (95%)

Rated (4.7/5)