/**
 *  This simple program will add the numbers between 1 and 10 and
 *  print the result on the console.
 */

import com.otherwise.jurtle.*;

public class AddEmUp extends Turtle
{
    int total = 0;

    public void runTurtle()
    {
        addUpTo( 10 );
    }

    private void addUpTo( int upperLimit )
    {
        int number = 1;
        
        while ( number <= upperLimit )
        {
            total = total + number;
            number = number + 1;
        }
        System.out.println( "Total of 1 to " + upperLimit + " is: " + total );
    }

}
