Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

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

Students also viewed these Databases questions

Question

Evaluate the importance of diversity in the workforce.

Answered: 1 week ago

Question

Identify the legal standards of the recruitment process.

Answered: 1 week ago