Question: q2: Write a public static method named q2 that takes two ints as parameters representing a 2d point (The first parameter is the x-value, second
q2: Write a public static method named q2 that takes two ints as parameters representing a 2d point (The first parameter is the x-value, second is the y-value) and returns a double. The return value shall be the Euclidean distance between the input point and the point (-20,-22) * See (https://docs.oracle.com/javase/8/docs/api/Java/lang/Math.html#method.summary) for a complete list of methods contained in the Math class. You may call any of these methods in your method q3: Write a public static method named q3 that takes no parameters and returns void. The method should print all the integers from 4 to 172 to the screen. The output should be inclusive of these end points s/ q4: Write a public static method named q4 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 natural logarithm within 1.0 of .59 (ie the target value of the natural logarithm is 0.59 and the allowed variance from this " target is 1.0) q5: Write a public static method named q5 that takes no parameters and returns a HashMap of Integers to Doubles. The returned HashMap should contain all the integers from 13 to 21 * as keys mapping to their square root as values. The output should be inclusive of the end * points
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
