public class doubleBoyut
{
  //sınıf değişkenleri
  public double a[];
  public int length;

  public doubleBoyut(double x[] )
  {
  length=x.length;
  a=new double[length];
     for(int i=0;i<length;i++)
       a[i]=x[i];
  }

  public doubleBoyut(int n)
  {
  a=new double[n];
  length=a.length;
  }

  public void boyutEkle(int n)
  {
  if(n>0)
     {
     int z=a.length+n;
     double[] b=new double[z];
     for(int i=0;i<a.length;i++)
       {b[i]=a[i];}
     a=b;
     length=a.length;
     }
  }

  public void boyutEkle()
  {
  boyutEkle(1);
  }

  public void boyutAzalt(int n)
  {
  int z=a.length-n;
    if(z>1)
    {
    double[] b=new double[a.length-n];
    for(int i=0;i<z;i++)
       b[i]=a[i];
    a=b;
    }
    else
    {
    double[] b=new double[1];
    b[0]=a[0];
    a=b;
    }
    length=a.length;
  }

  public void boyutAzalt()
  {
  boyutAzalt(1);
  }

  public double getValue(int i)
  { return a[i];}

  public double[] getValue()
  { return a;}

  public void setValue(double x,int i)
  { a[i]=x;}

  public void setValue(double[] x )
  {
  length=x.length;
  a=new double[length];
  for(int i=0;i<length;i++)
     {
     a[i]=x[i];
     }
  }

  public String toString(int i)
  { return String.valueOf(a[i]);
  }

  public String toString()
  {
  String s="";
  for(int i=0;i<length;i++)
    {
    s+=a[i]+" ";
    }
    s+="\n";
    return s;
  }
}
