// Aaron Tan
// 
// To test out BallV2 class 

import java.util.*;

class TestBallV2 {

   public static void main(String[] args) {

      Scanner scanner = new Scanner(System.in);
      String inputColour;
      double inputRadius;
      int    inputXCoord, inputYCoord;

      // Read inputs from user
      System.out.print("Enter colour: ");
      inputColour = scanner.next();
      System.out.print("Enter radius: ");
      inputRadius = scanner.nextDouble();
      System.out.print("Enter centre's x- and y-coordinates: ");
      inputXCoord = scanner.nextInt();
      inputYCoord = scanner.nextInt();
      
      // Create a default BallV2 object
      BallV2 myBall = new BallV2();

      // Set the colour and radius of this BallV2 object
      myBall.setColour(inputColour);
      myBall.setRadius(inputRadius);
      myBall.setCentre(inputXCoord, inputYCoord);

      // Display the contents of the Ball object
      System.out.println("Colour is " + myBall.getColour());
      System.out.println("Radius is " + myBall.getRadius());
      System.out.println("Centre is (" + myBall.getXCoord() + ", "
                          + myBall.getYCoord() + ")");

      // What output do you get for the following statement?
      // (We will learn how to deal with it next time.)
      // System.out.println("Ball's contents are " + myBall);

      // Move the object
      System.out.print("Distance to move horizontally: ");
      int dist = scanner.nextInt();
      myBall.moveHorizontal(dist);

      System.out.print("Distance to move vertically  : ");
      dist = scanner.nextInt();
      myBall.moveVertical(dist);

      // Display new centre
      System.out.println("Centre is (" + myBall.getXCoord() + ", "
                          + myBall.getYCoord() + ")");
      
   }

}

