Jeroo Lab 3 - rewriting code as methods

Use the program created earlier: Beautifying Lake Island
Susan starts on Lake Island at location (4,13) facing SOUTH with 4 flowers in her pouch. Her task is to plant the flowers to make the island look like the one shown. (You can open LAKE ISLAND from your JEROO folder)

Write a method called plantAndGo() that plants a flower, turns right and hops 5 forward.

Rewrite the main program to use the plantAndGo method.

Use the program created earlier:. The Relay
Three Jeroos (you give them names) are practicing for the Santong Relays. The first Jeroo begins at (4,9) facing EAST. It must pick the flower and give it to the second Jeroo who begins at (7,13) facing NORTH. The second gives the flower to the third Jeroo who begins at (4,15) facing WEST. The third Jeroo must plant the flower at (3,16), run to (3,21) and stop. (Open the Relay island file in your JEROO folder.)

Create a separate method for each phase of the relay so the main method will look like this:

Jeroo runner1= new Jeroo(4,9,EAST);
//also create the other 2 runners: runner2 and //runner3
runner1.pickAndPass( );
runner2.passTo3( );
runner3.plantAndRun( );


the course at the start of the race.

To create Jeroos:

Constructors

Jeroo actions

 

or jessica.hop(3);
will hop 3 times