import becker.robots.*;

class MysteryRobot extends Robot
{
    MysteryRobot( City c, int ave, int st, Direction dir, int num)
    {
        super(c, ave, st, dir, num);
    }

    public void Greet()
    {
        System.out.println ("Hello, from the Greet command!");
    }
    
    public void GreetWithANumber(int number)
    {
        System.out.println ("Hello, from the GreetWithANumber command!");
        System.out.println ("The number is: " + number);
    }
}

public class ICE_07_Output extends Object
{
    public static void main(String[] args)
    {
        City seattle = new City();
        MysteryRobot mary = new MysteryRobot(seattle, 1, 1, Direction.EAST, 0);


        System.out.println ("THE PROGRAM STARTS HERE!!");
        
        System.out.println ("Some fun with variables");
        int counter = 0;
        System.out.println (counter);
        counter = counter + 1;
        System.out.println (counter);
        System.out.println (" Counter is: " + counter);
        counter = counter + 3;
        System.out.println ("Counter is: " + counter);
        // Remember that spaces count - can you explain why the 
		  // first "Counter is" is indented one space?
        
        System.out.println ("Enough fun with variables - on to if statements!");
        if (counter < 4)
        {
            System.out.println ("counter is less than 4!");
        }  
        if (counter < 5)
        {
            System.out.println("Counter is less than 5");
        }

        System.out.println ("Now on to if...else statements!");
        if (counter < 4)
        {
            System.out.println ("counter is less than 4!");
        }
		  else
		  {
            System.out.println ("counter is MORE than 4!");
        }  
  
        if (counter < 5)
        {
            System.out.println("Counter is less than 5");
        }
		  else
		  {
            System.out.println ("counter is MORE than 5!");
        }  

        int otherNumber;
        otherNumber = 5;
        if( counter < otherNumber)
        {
            System.out.println ("Counter: " + counter + " is less than " + otherNumber);
        }
        if( otherNumber < counter )
        {
            System.out.println ("Counter: " + counter + " is greater than or equal to:  " + otherNumber);
        }
        
        System.out.println ("Enough fun with if statements - on to while loops!");
        
        counter = 0;
        while(counter < 2)
        {
            System.out.println ("Counter is: " + counter);
            counter = counter + 1;
        }
        
        otherNumber = 3;
        while(counter < otherNumber)
        {
            System.out.println (" Next loop - counter is: " + counter);
            counter = counter + 1;
        }
                
        System.out.println ("You may have to wait a couple moments while the CityFrame is built");
        
        System.out.println ("OK, on to commands");
        mary.Greet();

        System.out.println ("OK, on to commands, and parameters!");
        mary.GreetWithANumber(7);
        
		  
        System.out.println ("One last time.  Now with EXTRA SUPER FUN CHALLENGE!!");
		  counter = 0;
		  while( counter < 4)
		  {
		  		counter = counter + 1;

				if(counter < 3)
				{
					System.out.println("Counter value is: " + counter);
				}		  
				else
				{
					System.out.println("Final Stretch! " + counter);
				}
		  }
		  
        System.out.println ("THE PROGRAM ENDS HERE!!");
        }
}
