Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Could someone help me with this worksheet? (if possible please explain to me why it would be that answer) Magpie Chatbot Activity 4 Worksheet Consider
Could someone help me with this worksheet? (if possible please explain to me why it would be that answer)
Magpie Chatbot Activity 4 Worksheet Consider the modified getResponse method: public St.ring getResponse (string scatement) String response if (statement.1ength 0) response"Say something, ploase." else if findkeyword { statement, "no") >-O) response"hy so negative? else i indKeyword (statoment, "mather" >-0 I findkeyward(statemen, "tather") >- 0 findkeyward (statement, "sister"-0 |I findkeyword(statement, "hrother" >-0) response"Tell me more about your family." else if findKeyyard(statement, "I want to", 0 >-0) response-transformINantToStatenent (statement) else int pos findKeyword(stetement, "you " , 0}; - if (pos > 0 && findKeynord (statement, "me", pos)0) responsetransformYouMeStatement (statoment) else response -getandomResponse) Questions 1. Which version of the findkeyword method is used by the you/me statements? Why
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started