Question: supply code for each one to produce the indicated results. 1. Method hypotenuse(double a, double b) Recall from your studies in mathematics that a right

supply code for each one to produce the indicated results. 1. Method hypotenuse(double a, double b) Recall from your studies in mathematics that a right triangle has two perpendicular sides connected to a third side, typically referred to as the hypotenuse. The Pythagorean Theorem states that the relationship between the first two sides, a and b, and the hypotenuse, c, is a2 + b2= c2. This hypotenuse method accepts values for the right sides of a triangle, a and b, as arguments. Square these two values, add them, and then return the square root of the sum using theMath.pow() and Math.sqrt() methods. Do not use multiplication, and do not use the Math.hypot() method. 2. Methods max(double a, double b) and min(double a, double b) These methods accept two double values and return the largest or smallest of the two. No special Math or String methods are needed. 3. Methods max(String a, String b) and min(String a, String b) These methods accept two String values and return the lexicographically bigger or smaller of the two. You will need a String method here. 4. Method isSameText(String a, String b) This method compares strings a and b to see if they contain the same text. A String method may be needed here. 5. Method getLongestString(String a, String b, String c) This method compares the number of characters in each string rather than their lexicographic qualities. How do you determine how many characters there are in a string? Since there are three strings to compare, this method is slightly more challenging. 6. Method getShortestString(List list) The list may contain zero or more strings. Your task is to find the string in the list with the fewest characters. If the incoming list is null or contains zero strings, return null from this method. Otherwise, you will need to loop through the list to find the smallest string. This task will require the use of methods from both the List interface and the String class. 7. Methods getStringBeforeComma(String s) and getStringAfterComma(String s) These methods expect a string that has a comma somewhere inside of it. Your task will be to correctly provide the text leading up to the comma, as well as the text after the comma, but not the comma itself. This will require at least two methods from the String class.

Please help. If it can be detailed to each question that would be amazing. I'm trying to learn how to understand this.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!