Clara likes exercising and one of her favourite games is to climb stairs (made of trees, of course). In this Problem you have to help Clara to climb the set of stairs shown in Figure 1. In order to do so, she must follow the trajectory represented by a dotted line showed in Figure 2. Your program should be generic enough to handle any set of stairs. For testing purposes an additional world is supplied. Your code must run in both worlds with no modification.

University/Course: WSU

Uploaded: November 4, 2024

Files: 1

✓ Solution:

/* PERMITTED COMMANDS
   move, turnLeft, turnRight, treeLeft, treeRight, treeFront, onLeaf, putLeaf, removeLeaf, mushroomFront
   JAVA
   if, while, for
*/
class MyClara extends Clara { 
/**
     * In the ‘run()’ method you can write your program for Clara 
     */
void run() {
// TODO: Write your code below
while (treeFront()){ 

🔒 Whatsapp us for the full file.