hts.StevenWood.com

Karel 15d

Home ] Up ] Karel 15 ] Karel 15a ] Karel 15b ] Karel 15c ] [ Karel 15d ] Boolean Logic ] CheckList ] Rubric ][ Last Page ]

Karel 15d

Complete the following in class or for homework. Do NOT hand in your work unless other instructions were given.

1. The Robot class only comes with a frontIsClear() method.  Create a child of RobotSE by writing 3 more methods in the CheckerRobotSE class called rightIsClear(), leftIsClear(), and backIsClear().  These methods check for walls in those new directions.   

Make sure the robot is back in its original direction after performing each of the methods.

2.

A CheckerRobotSE has been hired to carpet some rooms. A room is a corner that has a wall segment immediately to the west, north, and east. The door is to the south. The robot is to put a single Thing in room and on no other corners. The robot starts with 8 things in its backpack.

 
 
Home ] Up ] Karel 15 ] Karel 15a ] Karel 15b ] Karel 15c ] [ Karel 15d ] Boolean Logic ] CheckList ] Rubric ][Last Page]
All material on this site is copyright © 1997- by Steven Wood or as credited. All right reserved. Use of this site indicates you agreement with the  terms of use.
Send comments or questions to about this page.
Every attempt has been made to credit work under copyright. If there are any claims that copyright has been missed please contact the .
+SDG+