Top Topics in our Forum';
Interactive Parabola Grapher
Explore graph ,equation and the locus of a Parabola
Save graphs to your desktop!

A+    A−    B  
Algebra
Games
Geometry
Interactive
Trigonometry
Forum




AddThis Social Bookmark Button

Jeroo : Getting Starting

How to Declare & Instantiate

Jeroo: How to Instantiate a Jeroo

A youtube video that I made up on how to use Jeroo.
method main()
{
...code here..
}


   
  

Creating a new Jeroo


Jeroos do not exist until you say so. To create a Jeroo, you have to declare the Jeroo, and then instantiate the Jeroo. Declaration means that you give the Jeroo a name. Instantiation means that you give the Jeroo some character traits, such as starting position, the direction she faces, or how many flowers she has. For example,

Making the Jeroo do something

Now that you have created a Jeroo named Kim, you want her to do something. Jeroos can do a few things. They can hop, pick a flower, plant a flower, toss a flower, and turn to face a new direction.

Here is how you make Kim hop:

  Kim.hop();

Here is how you make Kim pick a flower:
  Kim.pick();

Here is how you make Kim toss a flower. She'll toss to the square directly in front of her automatically.
  Kim.toss();

Can you guess how to make Kim plant a flower?
  Kim._?_();
She'll plant the flower whereever she is standing.

If you want Kim to turn, you have to tell her which direction you want her to turn - LEFT or RIGHT.
  Kim.turn(RIGHT);