Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider the method headings void funcOne( int [] alpha, int size) int funcSum(

ID: 672264 • Letter: C

Question

Consider the method headings

void funcOne(int[] alpha, int size)
int funcSum(int x, int y)
void funcTwo(int[] alpha, int[] beta)

and the declarations

int[] list = new int[50];
int[] AList = new int[60];
int num;

Write Java statements that do the following:
a. Call the method funcOne with the actual parameters, list and 50, respectively.

b. Print the value returned by the method funcSum with the actual parameters, 50 and the fourth element of list, respectively.

c. Print the value returned by the method funcSum with the actual parameters, the thirtieth and tenth elements of list, respectively.

d. Call the method funcTwo with the actual parameters, list and AList, respectively.

Explanation / Answer

1)
funcOne(list, 50);
2)
System.out.println( funcSum( 50, list[3] ) );
3)
System.out.println( funcSum( list[12], list[9] ) );
4)
funcTwo( list, AList );