title: Distance between multiple coordinates
body: <p>I am completely lost on how to sort the coordinates into an array, and find the distance between them. This is the question:</p>
  
  <ol>
  <li><p>Create a new class called “Circle” that can be used to create customized circle objects.  Your class should include the following – be sure to comment your class appropriately:
  double radius, 
  double xPosition, 
  double yPosition, and 
  A method that computes the distance from the xPosition and yPosition of one circle to the xPosition and yPosition of another circle.  Use the standard distance formula to compute this value.  You only need to compute the distance from center point to center point for the purposes of this method.  Here’s a method header to get you started:</p>
  
  <p>public double distanceFrom(Circle test)</p></li>
  <li><p>Create a new class called “Assignment06b”.  Do the following in this class:</p>
  
  <p>Prompt the user to enter in a number of circles (i.e. How many circles do you want to create?)
  Next, ask the user to enter in the radius, xPosition and yPosition for each circle.  Store their input in an array of Circles of the appropriate size.
  Finally, Iterate through your array and display distance information for each circle.  Ensure that you do not calculate the distance from a given circle back to itself (i.e. no need to compute distance between circle #1 and circle #1) — Here’s a sample running of your program. </p></li>
  </ol>
  
  <p>Here's what I have so far: </p>
  
  <pre><code>import java.util.Scanner;
  
  public class Assignment06b 
  {
      public static void main(String[] args) 
      {
          Scanner input = new Scanner(System.in); 
          System.out.print("How many circles do you want to create?:");
          int amount = input.nextInt();
  
  
          int[] arrayX = new int [amount];
          int[] arrayY = new int [amount];
  
  
          int counter = 0;
          for (counter = 0; counter &lt; amount; counter++)
          {
              System.out.println("Enter info for Circle #" + (counter + 1));
              System.out.print("Radius: ");
              double width = input.nextDouble();
  
              System.out.print("X Position: ");
              arrayX[counter] = input.nextInt();
  
              System.out.print("Y Position:");
              arrayY[counter] = input.nextInt();
          }
  
      }
  
      class Circle 
      {
          double radius;
          double xPosition;
          double yPosition; 
  
          Circle(double radius, double xPosition, double yPosition)
          {
  
          }
  
          public double distanceFrom(Circle test)
          {
              double equation = (xPosition-xPosition)*(xPosition-xPosition) + (yPosition-yPosition)*(yPosition-yPosition);
              double answer = Math.pow(equation, 0.5);
              return answer;
          }
      }
  }
  </code></pre>