import becker.robots.*;
import java.util.*;

class MysteryRobot extends Robot
{
    // In addition to hte normal things we have to worry about, 
    // we also want to remember the number of things to pick up.
    MysteryRobot( City c, int st, int ave, Direction dir, int num)
    {
        super(c, st, ave, dir, num);
    }

    public void turnAround()
    {
        this.turnLeft();   
        this.turnLeft();   
    }

    public void pace()
    {
        this.move();
        this.move();
        this.turnAround();
        this.move();
        this.move();
        this.turnAround();
    }
}

class MysteryRobotSubclass extends MysteryRobot
{
    // In addition to hte normal things we have to worry about, 
    // we also want to remember the number of things to pick up.
    MysteryRobotSubclass( City c, int st, int ave, Direction dir, int num)
    {
        super(c, st, ave, dir, num);
    }

    public void turnAround()
    {
        System.out.println("Hey, how's it going?" );
		// super.turnAround(); // uncomment this line to call the MysteryRobot's turnAround command
    }
}

public class ICE_10_Demo_2 extends Object
{
    public static void main(String[] args)
    { 
        City ForgetsVille = new City();
        MysteryRobot joe = new MysteryRobot(ForgetsVille, 4, 0, Direction.EAST, 0); 
        MysteryRobotSubclass rob = new MysteryRobotSubclass(ForgetsVille, 3, 0, Direction.EAST, 0);

        joe.pace();
        rob.pace();
    }
}

