hts.StevenWood.com

[ Last Page ]

Karel 11

Complete the following in class or for homework.

Use the concept of inheritance taught in class to create a child class of the RobotSE, named ClearThingsRobot. 

The robot is somewhere in the world facing south, on a corner with no Thing beside it. This robot's job is to head south and at each corner pick up a Thing. The robot is to stop when it reaches a wall (but not run into the wall). We do not know how far it is to the southern wall, so use an appropriate repetition structure. There will be exactly one Thing on each corner.

Use the city file SanJose.txt. In your robot task, use a ClearThingsRobot. Start your robot at street 2, avenue 1, facing South, with no things in its backpack, as approximately shown (the robot is the red arrowhead).

Test your program thoroughly. Document both your ClearThingsRobot code and task code properly.

Do NOT hand in your work unless other instructions were given.

 

    
[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+