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

this pic is methods , please help with the inputs.(I have copied the code) packa

ID: 3686730 • Letter: T

Question

this pic is methods , please help with the inputs.(I have copied the code)

package code;

import java.util.ArrayList;

public class Inputs {

   // Study the definition of the method
   // method_5
   // defined in the class Methods.
   // Define the following method so it returns a value which,
   // if passed as an argument to method_5,
   // causes method_5 to return the value 6.
   public ArrayList<String> inputForMethod_5() {
       return null;
   }
  
   // Study the definition of the methods
   // method_1 and method_5
   // defined in the class Methods.
   // Define the following method so it returns a value which,
   // if passed as an argument to both method_1 and method_5,
   // causes both to return the same value.
   public ArrayList<String> inputForMethod_1_and_method_5() {
       return null;
   }

DInputs,javaMethods.java3 1 package code; 2 3 import java.util.ArrayList; 4 5 public class Methods 6 7ed public int method 1(ArrayList

Explanation / Answer

public ArrayList inputForMethod_5() { ArrayList input = new ArrayList(); input.add("a"); input.add("bb"); input.add("ccc"); ArrayList output = new ArrayList(); output.add(new Method().method_5(input)); return output; } // Study the definition of the methods // method_1 and method_5 // defined in the class Methods. // Define the following method so it returns a value which, // if passed as an argument to both method_1 and method_5, // causes both to return the same value. public ArrayList inputForMethod_1_and_method_5() { ArrayList input = new ArrayList(); input.add("a"); ArrayList output = new ArrayList(); output.add(new Method().method_1(input)); output.add(new Method().method_5(input)); return output; }