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

a- Eclipse ndow Help ProblemSet. Algorithms 1..DProblemSet. ProblemSet blemSet i

ID: 3741337 • Letter: A

Question

a- Eclipse ndow Help ProblemSet. Algorithms 1..DProblemSet. ProblemSet blemSet import java.lang.reflect.Array public class ProblemSet zhengtao_e009t qi: write a public static methodnamedq1 that takes no parameters and returns a new 8 Arraylist of type Double containing the values 12.55, 4.8, 0.79, and 12.93. The order of " these values must be maintained public static void q1() { for(int i - e; icarray.length-1; i) System.out.printin(arrayli]): 14 18 q2: write a publicstatic "ethodnaned q2 that takes no parameters and returns. new 22Arraylist of type Double containing the values 5.31, 0.69, 4.09, and 4.42. The order of - * these values sust be maintained 5 publie statie void q20 ( Systes.out.print inCarrayl 1): 29)

Explanation / Answer

Error in line 12,13 and 26 and 27 in screenshot of code attached
is because array is not declared an initialized in the class ProblemSet_zhengtao_0009
Please check member variables of class ProblemSet_zhengtao_0009 and verify if array is
declared or not. only after array declaration we can use array.length in line 12 and 26
and access index value array[i] in line 13 and 27.

Let me know if you are still facing any issue in comments.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote