I need my id number to get sorted along with the average but I have no idea how to do it and my teacher barely touched on parallel arrays help please thanks!/* Program created by: Craig Noguez A program that creates a file containing a table showing the student ID numbers and averages of all the students in a course in ascending order by ID number. */ import java.io.*; import java.util.Scanner; public class assignment6 { public static void main(String[] args) throws IOException { Scanner keyboard = new Scanner(System.in); String fileName = ""; String[] idnumbers; String[] array; String[] average; int index = 0; String[] test = new String[100]; System.out.println("Enter the name of the file you would like to read."); fileName = keyboard.nextLine(); System.out.println(); idnumbers = getid(fileName); average = getavg(fileName); selectionSort(idnumbers); System.out.println("Enter the name of the file you would like to save the data to."); fileName = keyboard.nextLine(); PrintWriter outputFile = new PrintWriter(fileName); outputFile.printf(" IdNumber Average\n"); for(index = 0; index < average.length; index++) if(average[index] == null) outputFile.close(); else outputFile.printf("%5s %23s\n", idnumbers[index], average[index]); } /** A method to get the id-number from a text file. @param fileName The file to get the id-numbers from @return idnumbers Returns the array with the idnumbers stored */ public static String[] getid(String fileName) throws IOException { File file = new File(fileName); Scanner inputFile = new Scanner(file); int index = 0; int startid = 2; String[] idnumbers = new String[100]; String[] WholeFile = new String[100]; while(inputFile.hasNext() && index < idnumbers.length) { WholeFile[index] = inputFile.nextLine(); index++; } for(index = 0; startid < WholeFile.length; index++) { idnumbers[index] = WholeFile[startid]; startid += 4; } return idnumbers; } /** A method to get the averages from a text file. @param fileName The file to get the averages from @return average Returns an array with the averages stored in it */ public static String[] getavg(String fileName) throws IOException { File file = new File(fileName); Scanner inputFile = new Scanner(file); int index = 0; int startavg = 3; String[] WholeFile = new String[100]; String[] average = new String[100]; while(inputFile.hasNext() && index < average.length) { WholeFile[index] = inputFile.nextLine(); index++; } for(index = 0; startavg < WholeFile.length; index++) { average[index] = WholeFile[startavg]; startavg += 4; } return average; } /** A method that sorts the inputed string into alphabetical order. @param array The string to be sorted. */ public static void selectionSort(String[] array) { int startScan, index, minIndex; String minValue; for (startScan = 0; startScan < (array.length-1); startScan++) { minIndex = startScan; minValue = array[startScan]; for(index = startScan + 1; index < array.length; index++) { if (array[index] == null) break; else if (array[index].compareTo(minValue) < 0) { minValue = array[index]; minIndex = index; } } array[minIndex] = array[startScan]; array[startScan] = minValue; } } }