Answered step by step
Verified Expert Solution
Link Copied!

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)

image text in transcribed image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Expert Oracle Database Architecture

Authors: Thomas Kyte, Darl Kuhn

3rd Edition

1430262990, 9781430262992

More Books

Students also viewed these Databases questions