您所在位置网站首页 > 海量文档  > 专业论文 > 毕业论文

GridWorld Case StudyGridWorld的案例研究.PPT 64页

本文档一共被下载: ,您可全文免费在线阅读后下载本文档。

  • 支付并下载
  • 收藏该文档
  • 百度一下本文档
  • 修改文档简介


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


用户名: 验证码: 点击我更换图片

“原创力文档”前称为“文档投稿赚钱网”,本站为“文档C2C交易模式”,即用户上传的文档直接卖给(下载)用户,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有【成交的100%(原创)】。原创力文档是网络服务平台方,若您的权利被侵害,侵权客服QQ:3005833200 电话:19940600175 欢迎举报,上传者QQ群:784321556