Question: 15 Recursion 0/2 points Atrials: 1/2 What text should be in the missing part in the following recursive method that sums up the values fron

15 Recursion 0/2 points Atrials: 1/2 What text should be in the missing part in the following recursive method that sums up the values fron 1 ton. public static int sun(int n) { // assumes no if(nsal) return ne else return; > /Note: if your response is: X /This means you want the line to be interpreted as return (nex); Enter your responses here submit #16 Rocursion 2 wind Time left #16. Recursion 0/2 points Atrials: 4/4 // The method below returns the sum of all the values in // index @ ton of the scores array using recursion public static int sumOfArray(int scores [], int n) { 17 Inco) return ; // line 1 else if (nano) return ; // line 2 else return ); // line 3 - hint: something + another thing Question: Enter the three missing parts for the separated by returns i.e. one per line. Each line in your answer should indicate the exact values to be substituted into the missing segments in the nethod. For example, if your response is the following 3 Lines: X+1 A 2+2 that means you want the method to be interpreted as: public static int sunofArray(int scores ll, int n) { it (no) return X+1; // line 1 else if (n) return A; // line 2 else return 2+2; // line 3 - hint: something + another thing 2 Enter your response here
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
