hts.StevenWood.com

Karel 15b

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

Karel 15b

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

1. Create a CompassBot that will contain four methods called faceNorth(), faceSouth(), faceEast(), faceWest(). These methods will face the robot in the specified direction no matter which direction it is initially facing.

CompassBot is a child of Robot.

Examine the Robot  documentation to find out how to determine which direction the robot is currently facing.

Test your robot.

2. Build another version of CompassBot that is called CompassBotSE and extends RobotSE.

Examine the Robot  documentation to find out easier ways of having this robot clear the room.

 
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+