请编写方法double sumSequence(int n),该方法的功能是求以下数列前n项的和s并返回:
double s = 0.0;int numerator = 1;int denominator = 1;int temp;for(int i=1; i<=n; i++) { s = s + numerator/(double)(numerator+denominator); temp = numerator; numerator = numerator+denominator; denominator = temp;}return n;