import java.util.ArrayList; import java.util.Collections; import java.util.List; import static java.lang.System.out; public class homework { public static void main(String[] args) { List<Integer> list = new ArrayList<>(); for (int i = 0; i < 10; i++) list.add(int) (Math.random()* 10) + 1); Collections.sort(list); System.out.println("The list id : " + list); int index =linearSearch(list, 10); if (index >+ 0) System.out.println("Linear search: the number 5 was found at index " + index); else System.out.println("Linear search: the number 5 is not found "); List<String> names = new ArrayList<>(); names.add("Tyson"); names.add("John"); names.add("Edgar"); names.add("LouLou"); Collections.sort(list); System.out.println("The names are : " + names); index = linearSearch(names, "JOhn"); if (index >= 0) System.out.println("Linear search: Edgar was found at index " + names); else System.out.println("Linear search: Edgar is not found" + names); } public static <E> int linearSearch(List<E> lsit, E data) { for (int i = 0; i < list.size(); i++) if (list.get(i).equals(data)) return i; return -1; } } Chapter 14 - Linear Search and Binary Search - Assignment Due Wednesday by 11:59pm P Points 100 Submitting a text entry box or a file upload Allowed Attempts 1 Available until Mar 1 at 11:59pm Modify the binarySearch method shown in the video lecture so that it's generic. Test it with at least two types to make sure it works. Hint 1: Examine the review problem and its solution, which modifies the linear search algorithm in the same way. Hint 2: Your binarySearch method signature should be: "private static < E extends Comparable > boolean binarySearch(List list, E data): Turn in the following, - The source files (no zip file, just the individual java files). - A screen shot of your program in action. It should show the result of the test run. .