Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Infrastructure For Medical Research In Databases

Authors: Thomas Heinis ,Anastasia Ailamaki

1st Edition

1680833480, 978-1680833485

More Books

Students also viewed these Databases questions