Question: k3k ql: Write a public static method named q1 that takes an ArrayList of Doubles as a parameter and returns an Arraylist of Doubles. The
k3k ql: Write a public static method named q1 that takes an ArrayList of Doubles as a parameter and returns an Arraylist of Doubles. The returned ArrayList will contain only *the values from the input ArrayList that have a cube within 977.0 of 683240.47 (ie. the *target value of the cube is 683240.47 and the allowed variance from this target is 977.0) x3x * q2: Write a public static method named q2 that takes an ArrayList of Integers as a parameter and returns an int. The returned int should be the sum of the values in the * input ArrayList at indices 16, 18, 19, and 8. You can assume the input ArrayList has size *large enough to avoid an index out of bounds exception at these indices q3: Write a public static method named q3 that takes no parameters and returns void. The method should print all the integers from -5 to 117 to the screen. The output should be * inclusive of these end points q4: Write a public static method named q4 that takes no parameters and returns a HashMap of Integers to Doubles. The returned HashMap should contain all the integers from 23 to 43 * as keys mapping to their cube as values. The output should be inclusive of the end points *q5: Write a public static method named q5 that takes an ArrayList of Doubles as a parameter and returns an ArrayList of Doubles. The returned ArrayList will contain all values from the input ArrayList except those that have a cube root within 3.0 of 4.89 (ie * the target value of the cube root is 4.89 and the allowed variance from this target is * 3.0)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
