After starting your project you will see Clara’s world shown in Figure 1. The aim of this problem is to make Clara exit her home, collect the leaf located outside, bring it back and put it in the position shown in Figure 2. Clara should move and turn to be positioned as shown in Figure 2.

University/Course: WSU

Uploaded: November 2, 2024

Files: 1

✓ Solution:

/* PERMITTED COMMANDS
   move(); turnLeft(); putLeaf(); removeLeaf();
*/
   
class MyClara extends Clara { 
    /**
     * In the ‘run()’ method you can write your program for Clara 
     */
    void run() {
        // TODO: Write your code below
   move();
  turnLeft();
    turnLeft();
    turnLeft();
    move();
    turnLeft();
move();
move();
move();
move();
move();
turnLeft();
move();

🔒 Whatsapp us for the full file.