Run the program and chat with Magpie. Complete the worksheet with the responses received as the...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Run the program and chat with Magpie. Complete the worksheet with the responses received as the following statements are entered: • I want to build a robot. • I want to understand French. • Do you like me? • You confuse me. Look at the code for the Magpie4 class. Trace it to see how it handles statements containing "I want to." Specifically look at the getResponse and transformIWantToStatement methods. Alter the code: • Have it respond to "I want something" statements with "Would you really be happy if you had something?" In doing this, you need to be careful about where you place the check. Be sure you understand why. For example: Statement: I want fried chicken. Response: Would you really be happy if you had fried chicken? Now look at the Magpie4 class and locate the code that handles statements containing "you something me." Pay close attention to the getResponse method and when it calls the transform YouMeStatement method. Alter the code again: Have it respond to statements of the form 'I something you" with the restructuring "Why do you something me?" For example: Statement: I like you. Response: Why do you like me? Test the alterations by chatting with Magpie. Ensure the expected response appears. Record your conversation in the worksheet and answer the remaining questions for Activity 4. Run the program and chat with Magpie. Complete the worksheet with the responses received as the following statements are entered: • I want to build a robot. • I want to understand French. • Do you like me? • You confuse me. Look at the code for the Magpie4 class. Trace it to see how it handles statements containing "I want to." Specifically look at the getResponse and transformIWantToStatement methods. Alter the code: • Have it respond to "I want something" statements with "Would you really be happy if you had something?" In doing this, you need to be careful about where you place the check. Be sure you understand why. For example: Statement: I want fried chicken. Response: Would you really be happy if you had fried chicken? Now look at the Magpie4 class and locate the code that handles statements containing "you something me." Pay close attention to the getResponse method and when it calls the transform YouMeStatement method. Alter the code again: Have it respond to statements of the form 'I something you" with the restructuring "Why do you something me?" For example: Statement: I like you. Response: Why do you like me? Test the alterations by chatting with Magpie. Ensure the expected response appears. Record your conversation in the worksheet and answer the remaining questions for Activity 4.
Expert Answer:
Answer rating: 100% (QA)
Heres the modified code based on your instructions class Magpie def initself selfresponses I want to ... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Predictive text entry systems are familiar on touch screens and mobile phones. This question asks you to consider how the same principles might be used in a programming editor for creating Java code....
-
Suppose you are the manager of an investment fund. The fund is invested in following three assets with the following investments and betas: Stock Shares C Price per share 50,000 $50 MCD 10,000 $200...
-
Alpine Expeditions operates a mountain climbing school in Colorado. Some clients pay in advance for services; others are billed after services have been performed. Advance payments are credited to an...
-
1. What immediate measures would you take to resolve the problem? 2. How would you produce the appropriate product as soon as possible? 3. Who should you call first, if anyone, to alleviate the...
-
Four particles of identical charge and mass enter a region of uniform magnetic field and follow the trajectories shown in Figure Q24.33. Which particle has the highest velocity? FIGURE Q24.33 A. B....
-
Companies should focus on financial measures of quality because these are the only measures of quality that can be linked to bottom-line performance. Do you agree? Explain
-
Suppose that Karen deposits $400 into her checking account at the bank. The reserve requirement for Karen's bank is 9%. Assume the bank does not want to hold any excess reserves of new deposits. a....
-
You are discussing your 401(k) with Dan Ervin when he mentions that Sarah Brown, a representative from Bledsoe Financial Services, is visiting East Coast Yachts today. You decide that you should meet...
-
Detailed Design Describe a detailed flow between the components for a video viewing application like YouTube.
-
The main point of project management is the concept of an "iron triangle" where you can do trade-off analysis between cost, schedule, and performance. Research this concept online. Then, address the...
-
Access the data from the file "soil moisture water balance.xls" and calculate average daily precipitation for each month. Also, calculate the unadjusted Heat Index (i) for each month as is done for...
-
Since 2010, Gary has been a limited partner of XYZ Company, which has not been profitable. He has a $3,500 prior year loss disallowed by the passive activity rules. Gary's status changed to general...
-
Part 2. (Total marks 25) Assume that you are supplier's relations manager in dairy manufacturing company, recently you locked RFP rates for coming 2 years with transportation service providers...
-
https://www.wsj.com/articles/the-job-market-for-remote-workers-is-shrinking-11674526943?mod=management_lead_pos4 Article: The Job market for Remote Working is Shrinking January 24, 2023 Provide the...
-
2. Find the roots of the following: (10 pts. each) z6 = 2 4i b. z - 2iz - 3i 5 = 0 .
-
The test statistic in the NeymanPearson Lemma and the likelihood ratio test statistic K are intimately related. Consider testing H 0 : = 0 versus H a : = a , and let * denote the test statistic...
-
John Fuji (age 37) moved from California to Washington in December 2011. He lives at 468 Cameo Street, Yakima, WA 98901. John's Social Security number is 571-78-5974 and he is single. His earnings...
-
During the 2012 tax year, Irma incurred the following expenses: Union dues..............................................................$275 Tax return preparation...
-
Scott Butterfield is self-employed as a CPA. He uses the cash method of accounting, and his Social Security number is 644-47-7833. His principal business code is 541211. Scott's CPA practice is...
-
Consider the homogeneous bar, of negligible cross section, mass \(M=1.333 \mathrm{~kg}\) and length \(L=60.0 \mathrm{~cm}\) in Fig.12.19 . It is constrained to rotate in a vertical plane about its...
-
A projectile of mass \(m=2.5 \mathrm{~kg}\) is shot tangentially (see Fig.12.19) at the edge of a ring having radius \(R=50 \mathrm{~cm}\) and whose mass is equal (within measurement errors) to that...
-
A homogeneous disk, having mass \(M=2.50 \mathrm{~kg}\) and radius \(R=15.0 \mathrm{~cm}\), can rotate, without friction, about a fixed horizontal axis, passing through the point \(\mathrm{O}\) of...
Study smarter with the SolutionInn App