public Vector plus(Vector that){
  if (this.d != that.d)   throw new IllegalArgumentException("Dimensions don't agree");
  Vector c=new Vector(d);
  for (int i=0; i < d; i++)   c.data[i]=this.data[i] + that.data[i];
  return c;
}

public Vector plus ( Vector that ) { if ( this . d != that . d ) throw new IllegalArgumentException ( "Dimensions don't agree" ) ; Vector c = new Vector ( d ) ; for ( int i = 0 ; i < d ; i ++ ) c . data [ i ] = this . data [ i ] + that . data [ i ] ; return c ; }
returns the sum of this vector and the specified vector .
