write a guessing game. In this program, you will create an array of 20 elements and write
Fantastic news! We've Found the answer you've been seeking!
Question:
write a guessing game. In this program, you will create an array of 20 elements and write a methods that randomly generates integer values between 1 and 100 (inclusive). The method then uses the Java built-in sort function Arrays.sort(myArray) to sort the array in ascending order and returns the sorted array. The program then asks the user to think of an integer between 1 and 100. The program may ask the user a question such as “Is your number bigger than 61?” See below for example sample runs. Your program should have a worst-case time of O(log n), where n is the size of the collection object.
Please for make the output to look similar to the output below
Related Book For
Posted Date: