Question: can you help with java code? Write a class called ArrayHelper that contains the following methods: A static method called isSorted that accepts an array
can you help with java code?
Write a class called ArrayHelper that contains the following methods: A static method called isSorted that accepts an array of real numbers (double) and returns true if the list is sorted in ascending order. A one element array is considered sorted. Return false if the array is null. A static method called isReverse that accepts two arrays of ints and returns true of one list is the reverse of the other list. Return false if either or both lists are null. A static method called whoIsBuying that accepts an arrays of strings and randomly returns one of the strings. If the array is a null return a null. Be sure all names in the array have the same chance of being chosen. A static method called longestString that accepts an array of strings and returns an array of String with two elements. The first element will be the longest String(the last occurrence in the case of a tie) and the second element will be the index that it was found at(expressed as a string) . If the list is null return a null. Write a class called ArrayHelperTester. This class with invoke each method above as many times as needed to make sure that they work correctly in all cases. What are all the cases?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
