Help with Java task (Karel)

User Generated

xpyoz4

Programming

Description

I have a question regarding Java. My task is Problem #9 on this paper (http://shhs.javawide.org/images/8/88/compCH2.pdf) (Disregard the answer; it is incorrect for my problem). My goal is to do a figure 8 with as less commands as possible (Commands are move (); , turnLeft (); even if I make a method such as turnRight (); with 3 turnLeft(); commands it counts as 3 commands). I know how to solve the problem; I can make the figure 8, but what is the way that uses the least commands? Thanks.

User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

If you type out all that you need you could figure out how to combine some of the source code to make your own methods to do the same thing. To do a figure 8 it would have to be 2 squares touching each other (top one and one directly below it touching the bottom part of the top one). I hope this helps. Let me know if you need more information

Related Tags