
中级实训
文章平均质量分 67
酷酷的猪
这个作者很懒,什么都没留下…
展开
-
PART5README
运行截图1运行并选择我们已经写好的网格的存储方法,然后输入我们想要的即可2These methods could be used without change:public ArrayList<Location> getOccupiedLocations()public E get(Location loc)public E put(Location loc, E obj)public E remove(Location loc)Fill in the followi原创 2022-03-15 16:48:59 · 207 阅读 · 0 评论 -
PART4README
运行截图修改ChameleonCritter中的processActors,使得当actor处理列表为空时,ChameleonCritter颜色变暗:开始界面:开始往下step:1开始时界面开始往下step:变色:2开始时界面原创 2022-03-15 16:48:35 · 135 阅读 · 0 评论 -
PART3README
运行截图开始界面:开始step:原创 2022-03-15 16:48:18 · 132 阅读 · 0 评论 -
PART2README
运行截图1当碰到障碍物时,bug一个step只转向45度,直到前方无障碍物:开始界面:当遇到障碍物时:只向右旋转45度2运行结果:原创 2022-03-15 16:47:50 · 106 阅读 · 0 评论 -
Part5
Set 10Where is the isValid method specified? Which classes provide an implementation of this method?Answer:The isValidmethod is specified by Grid, and is implemented by the BounededGrid class and UnboundedGrid class.Source code:// @file: GridWorldCod原创 2021-11-08 12:48:47 · 107 阅读 · 0 评论 -
Testreport
Jumper测试测试点:Jummper是否会跳出边界Test Code// @file: Part3/JumperTest.java// @line: 15~23@Testpublic void test1() { /* * case: Boundary */ ActorWorld world = new ActorWorld(); Jumper alice = new Jumper(); world.add(new Location(0, 9), alice); a原创 2021-11-08 12:48:20 · 190 阅读 · 0 评论 -
designreport.md
Inception: clarify the details of the problem:a. What will a jumper do if the location in front of it is empty, but the location two cells in front contains a flower or a rock?Answer:If the location two cells in front contains a flower then the jumper原创 2021-11-08 12:47:45 · 111 阅读 · 0 评论 -
Part4问答题
Set 7What methods are implemented in Critter?答:act(),getActors(),processActors(ArrayList<Actor> actors),getMoveLocations(),selectMoveLocation(ArrayList<Location>locs),makeMove(Location loc)Source Code:// @file: GridWorldCode/framework/inf原创 2021-11-08 12:47:18 · 146 阅读 · 0 评论 -
Part3
Set 3Assume the following statements when answering the following questions.Location loc1 = new Location(4, 3);Location loc2 = new Location(3, 4);How would you access the row value for loc1?答:使用函数:loc1.getRow();//@file: GridWorldCode/framework/info原创 2021-11-08 12:46:53 · 139 阅读 · 0 评论 -
Part2问答题
Set 2 The source code for the BoxBug class can be found in the boxBug directory.1.What is the role of the instance variable sideLength? public BoxBug(int length) { steps = 0; sideLength = length; } /** * Moves to th.原创 2021-11-08 12:46:22 · 104 阅读 · 0 评论 -
Part1
1. Does the bug always move to a new location? Explain.不。如果bug遇到墙壁或者岩石之类的东西就会停留在原地。2. In which direction does the bug move?如果bug的前方没有障碍(墙壁或岩石)的话,bug将直线前进如果bug的前方有障碍,bug会多次向右旋转45度直到前方无障碍物为止。3. What does the bug do if it does not move?如果bug不动的话它将做向右旋原创 2021-11-08 12:45:47 · 146 阅读 · 0 评论 -
Vi、Java、Ant,Junit自学报告
Vi/VimVim是从vi发展出来的一个文本编辑器,支持代码补全,编译和错误跳转等方便编程的功能。vi/vim有三种模式:命令模式输入模式底线命令格式命令模式启动vi/vim即进入命令模式,在此状态下敲击键盘会被vim识别为命令,而非输入字符。在此模式下可以对文件进行常规的编辑操作,例如:定位,翻页,赋值,粘贴,删除等。常用的命令:i切换到输入模式,以输入字符x删除当前光标所在处的字符:切换到底线命令模式,可以在最小面一行输入命令。输入模式在命令模式下,输入i即可进入原创 2021-11-08 12:45:09 · 156 阅读 · 0 评论