GridWorld Case StudyGridWorld的案例研究.PPT

  1. 1、本文档共64页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
GridWorld Case Study Barbara Ericson Georgia Tech ericson@cc.gatech.edu Jan 2008 Purpose of a Case Study Give students a larger program to study and extend context to apply inheritance and polymorphism Serve as an example of good design and coding practices and a context for discussion of issues An early study showed that students who had a case study performed better on the AP exam than those who didn't women perform better than men usually on case study questions Why did the Case Study Change? The Marine Biology Case Study was too complicated hard to extend beyond fish Goals for new case study Reuse part of the Marine Biology Case Study Have fewer classes Be easier to extend Be rich enough for a variety of exam questions Set-up Add gridworld.jar to the classpath in your IDE So that Java can find the classes in GridWorld In DrJava click on Edit and then Preferences Then click on the add button and add gridworld.jar Then click apply Exit and start DrJava again Chapter 1: Intro to GridWorld Open BugRunner.java In projects/firstProject Run the main method Click the step button Click on an empty grid cell and create a rock in front of the bug Click on the Step button Click on a bug Get a menu of methods Click on a method to invoke it Click on a flower and a rock too Exercise Set 1 Does the bug always move to a new location? In what direction does the bug move? What does the bug do if it can’t move? What does the bug leave behind when it moves? What happens when the bug is at the edge of the grid? And facing the edge? And not facing the edge? What happens when a bug is facing a rock and you click step? Does a flower move? What behavior does a flower have? Does a rock move or have any other behavior? Can more than one actor (bug, flower, rock) be in the same grid location at the same time? Exercise Answers Set 1 Does the bug always move to a new location? No, not if a rock is in front or if it is facing a boundary of the world In what direction does the bug move? The

文档评论(0)

dsf80fhg0j + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档