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

Can you help me fix my code? This is done in Java, and there are 2 methods I mad

ID: 3817890 • Letter: C

Question

Can you help me fix my code? This is done in Java, and there are 2 methods I made. The first one is called setValues(), and the second one is called countFrequency().

Here are the instructions for the first method:

here is my code for the first method

Here are the instructions for the second method:

Here is my code for the second method:

with a for loop with a start of int i 0 0 a a Set the ending point of when i is less than the length of the arr array Set the incrementation to increase i by 1 using the unary operator Within the loop set the arr array element with an index of i to equal the variable value. Call the anim method with an argument of i like we did in the so rtArray0 method

Explanation / Answer

I) For the first method, I think Animate method should be inside the Loop . Therefore its not getting the value of i
this will resolve the error.

II) For The countFrequency one, Inside for loop I see i = 0, make it int i = 0;
and make    value == getCurrent() [Add == in place of = ]


========
Note: If you are still facing the issue, Please let me know I can suggest and help you fix it

The statements said by me above will fix your compilation problems.