Complete the following program by completing the code segmen…
Complete the following program by completing the code segments using the drop-down menu for each missing code segment: import java.io.IOException;import java.nio.file.Files;import java.io.PrintWriter;import java.nio.file.Paths;import java.util.Scanner;import java.util.ArrayList;import java.io.FileWriter;import java.util.HashMap; public class ArrayList_and_HashMap{ public static void main(String //creating an empty ArrayList of integers Scanner input = new Scanner( , “UTF-8”); //creating a scanner //gather input from the input file while (input.) { fahreinheit_list.add(input.nextInt()); } // Creates a second ArrayList called celsius_list ArrayList celsius_list = /* Using the farhienheit_list ArrayList, calculate each Farheinheit’s equivalent Celsius temperature and store the result in the ArrayList called celsius_list*/ Integer current_value; for (int i=0; i < ; i++) { current_value= (fahreinheit_list.get(i)-32)* 5/9; celsius_list.; } //Create an output file FileWriter writer= new FileWriter("temperature_conversion_table.txt"); //printing out the headings writer.write("Fahrenheit\tCelsius\n"); //for loop to output to file for (i=0; i < fahreinheit_list.size(); i++) { writer.write(fahreinheit_list.get(i)+ "\t\t"+ celsius_list.get(i)+ "\n"); } writer.close(); //closing file // Open the "temperature_conversion_table.txt" file that was just processed and filed. // Pull in the data stored within it into a hash_map, where each key will be the //fahreinheit temperatures and each value associated with that key will be the Celsius //temperatures. input = new Scanner(Paths.get("temperature_conversion_table.txt"), "UTF-8"); = new HashMap(); String first_line = input.nextLine(); for (i=0; i < fahreinheit_list.size(); i++) //loop to store to hashmap { temperature.; } //Output the conversion table as formatted above to the screen using the hashmap //holding the fahrenheit keys and the celsius values (use the enhanced for loop from //the PowerPoint lecture as a reference) System.out.println("Fahrenheit\tCelsius"); //printing out heading for (String t: ) { System.out.println(t + "\t\t"+ temperature.get(t)); } //Close the temperature_conversion.txt file }//end main method }//end class