[solved]-Write Java Please Please Explain File Read Program Enable Program Sort Data Contained Prog Q39032974

Write this in java please and please explain howthe file is read into the program to enable the program to sort outthe data that is contained in the programRequirements 1 1. Insertion Sort a. Write a static method to sort an array of doubles using the insertion sort. You must use the insertion sort algorithm and write code to implement it. b. Put the insertion sort algorithm in its own class. C. Do not depend on the length of the array. Instead, provide a parameter that gives the number of values to be sorted. d. Sort the values in descending order. That is, the largest number should end up as the first number in the array. e. The sort method does not perform any 1/0 (reads/writes). 2. User interface class a. Create a second class which will contain your main() method. b. Your main() method will call the sort method. c. Display the values you are going to sort, then sort them and then display them in sorted order. d. Display your name 3. Files and Exceptions a. Read the values to be sorted from a file. b. Prompt the user for the name of the file. c. Implement exception handling. If an error occurs, give a meaningful error message and stop the program. d. At a minimum, specifically catch the exceptions that occur when o the file cannot be found o values in the file are not numbers o a reference is made past the end of the array O a reference is made to a null object e. Catch all other exceptions. f. The format of the file will be: number number number Here is an example: 14.6 We were unable to transcribe this imageShow transcribed image text Requirements 1 1. Insertion Sort a. Write a static method to sort an array of doubles using the insertion sort. You must use the insertion sort algorithm and write code to implement it. b. Put the insertion sort algorithm in its own class. C. Do not depend on the length of the array. Instead, provide a parameter that gives the number of values to be sorted. d. Sort the values in descending order. That is, the largest number should end up as the first number in the array. e. The sort method does not perform any 1/0 (reads/writes). 2. User interface class a. Create a second class which will contain your main() method. b. Your main() method will call the sort method. c. Display the values you are going to sort, then sort them and then display them in sorted order. d. Display your name 3. Files and Exceptions a. Read the values to be sorted from a file. b. Prompt the user for the name of the file. c. Implement exception handling. If an error occurs, give a meaningful error message and stop the program. d. At a minimum, specifically catch the exceptions that occur when o the file cannot be found o values in the file are not numbers o a reference is made past the end of the array O a reference is made to a null object e. Catch all other exceptions. f. The format of the file will be: number number number Here is an example: 14.6
Expert Answer
Answer to Write this in java please and please explain how the file is read into the program to enable the program to sort out the… . . .
OR

