public class Dot{
   private int x;
   private int y;   

   public Dot(int X, int Y){
      x = X;  
      y = Y;  
   }
   
   public int getX(){
       return x;
   }
   
   public int getY(){
       return y;
   }
   
   public Dot displacedDot(int dispAmt){
       int newX = x + dispAmt;
       int newY = y + dispAmt;
       Dot d = new Dot (newX, newY); //create a new Dot
       return d; //return reference to the new Dot created
   }
}

