import java.util.Scanner;


public class Vector
{
  
  static double x=0.0;
  static double y=0.0;
  public Vector(double x, double y)
  {
  }
  public static void main(String args[])
  {
    System.out.println("Programa que calcula propiedades basicas de un vector");
    Scanner teclado= new Scanner(System.in);
    for (int contador=1; ;++contador)
    {
      Vector vector1= new Vector(x,y);
      Vector vector2=new Vector(x,y);
      
      System.out.println("Ingrese la coordenada x");
      x = teclado.nextDouble();
      
      System.out.println("Ingrese la coordenada y");
      y = teclado.nextDouble();
      
      System.out.println("\nVector " + contador); 
      
      System.out.println("La suma es: "+ suma());
      
      System.out.println("La resta es: "+ resta());
      
      System.out.println("La resultante es: "+ resultante());
      
      System.out.println("El angulo es: "+ angulo());
    }  
    
  }
  public String toString()
  {
    return "V = " +"("+ x + "," + y +")";
  }
  public static double suma()
  { 
    
    return vector1.x+vector2.x;
    return vector1.y+vector2.y;
  }
  
  public static double resta()
  {
    return x-y;
    
  }
  public static double resultante()
  {
    return Math.sqrt(x*x+y*y);
  }
  public static double angulo()
  {
    return Math.atan2(x,y);
  }
}