Choosing a name A friend has asked for your help in naming their baby that is due any day. They want to choose a traditional name, but not a name that is very popular. They are providing you a list of names that were most popular in the prior year. They have asked that you write a program that will take in a name and an integer (n) and ensure that the selected name does not exist in first names in the list. In addition, a sorted list of the specified number of names is saved to a file. The Specifics: Your program will have two classes, ArrayFunctions and FileDriver. ArrayFunctions will contain the following static methods: • readArray-takes in a string representing the filename and a reference to an array of Strings (the array should be allocated prior to the method call). The method will fill the array from the file. You may assume there is one name per line. If there are more lines in the file than the array has the capacity to hold, only read enough to fill the array. If there are not enough names in the file to fill the array, keep track of the number actually loaded into the array. This method will return the number of values added to the array. Exception handling: this method will have no throws clause - you must use exception handling to handle the following exceptions. • If the array reference is null and you attempt to access the array, a NullPointerException will be thrown. If this happens, return 0. • If the file does not exist, return O. writeArray-takes in a String representing the filename, an array of Strings and returns a boolean. The method will write the names to the file, preceded by numbers. 1: Ana 2: Aria The return value indicates if the write was successful (true) or not (false); Exception handling: this method will have no throws clause - you must use exception handling to handle the following exceptions. . If the array reference is null and you attempt to access the array, a NullPointerException will be thrown. If this happens, return false. • If any file exception occurs, return false. selectionsort - this is the same selection sort we have used in class, with two exceptions. The method takes a second integer, n, representing the number of elements in the array, allowing support of partially full arrays. The method works on an array of strings. • binarySearch - This is a RECURSIVE implementation of binary search. Don't reinvent the wheel, you may start with the code given in the book. The method will require modification to work on an array of Strings. FileDriver will contain a main method that accomplishes the following: • Prompt the user for the name of the file Prompt the user for an integer value, representing the number of names to read from the file. Validate this number, both in type and value. If the user enters a String, your program should not crash For example: How many names would you like to search through? abc abc is not an integer Enter a positive integer value -10 Enter a positive integer value 5 • Create the array, Using the method readArray in ArrayFunctions, load the specified number of names into an array of strings. Note: this method returns the number of names read it (you could end up with a partially full array); if this occurs, notify the user and proceed. • Using the method selectionSort in ArrayFunctions, sort the names. Using the method writeArray in ArrayFunctions, write the sorted data to a new file. The name of the file should be the original filename preceded by "sorted". For example, if the specified filename is "names.txt", the new file should be "sorted_names.txt". If the method writeArray is not successful, issue a message to the user ("write was unsuccessful"). Using the binarySearch method in ArrayFunctions, search the array for the user specified name. Report the results. For example: Mary was 138 on the list or Mary was not in the top 100