Choose the signature for methods that solve the following problems, or state tha
ID: 3817607 • Letter: C
Question
Choose the signature for methods that solve the following problems, or state that it is impossible to do so. You do not need to write these methods (method writing is covered in Turingscraft, Zyante, and Javabat). Generates a random integer between two given integers (inclusive). Generates a random double between two given integers (exclusive). Generates a random integer between two given integers (inclusive) that will be even or odd, depending on whether a given boolean is true (even) or false (odd). Generates two random integers between two given integers. Determines whether a given integer is or is not prime. Prime means that the number has no factors other than 1 and itself. Seven is prime. Eight is not prime because 2 and 4 are factors.Explanation / Answer
1.int generateRandInt(int min,int max); return type is integer and paramenters are two integer values
2.double generateRandDouble(int min,int max); return a double value with input parameters as 2int values
3.int generateRand(int min,int max,boolean check); returns integer value with input parameters as 2integer values and a boolean variable.which when false ia odd and true ia even num generation
d. int[] genrateRand(int min,int max);
To return 2values we can use array as return type
e. Method return true or false if prime true else false,input is an integer.
boolean checkPrime(int num);