Question: Java program This is the Stock.txt if you need it: import java.io.FileNotFoundException; import java.io.PrintWriter; import java.io.UnsupportedEncodingException; import java.util.Random; import java.util.Scanner; public class WriteStringsToFile { public
Java program

This is the Stock.txt if you need it:
import java.io.FileNotFoundException; import java.io.PrintWriter; import java.io.UnsupportedEncodingException; import java.util.Random; import java.util.Scanner;
public class WriteStringsToFile { public static void main(String args[]) throws FileNotFoundException, UnsupportedEncodingException { String data[] = {"IBM, International Business Machines Corporation, 144.84, 5/2/2016", "AAPL, Apple Inc. 92.63, 5/2/2016", "ORCL, Oracle Corporation, 45.96,4/26/2018", "CSCO, Cisco Systems, 44.21, 4/26/2018"}; PrintWriter writer = new PrintWriter("stocks.txt", "UTF-8"); int res; for(int i = 0;i
Write a program to read data from the file stock.txt. for each line of data create an object of Stock class and store them in 1) ArrayList 2) a hash map as HashMap. The key will be the Symbol field (like IBM or CSCO) 3) Ask user to enter the symbol 4) Call a method searchArrayList(ArrayList, symbol) to search the ArrayList for the Symbol and return the price 5) Call a method searyHash(Hash,symbol) to search the Hash for the symbol and return the price 6) Call method printArrayList to print all the information of Stock 7) Call method printHash to print all the information of Stock in 8) Add one more Stock (ORCL, Oracle Corporation, 45.96, 9) Call method printArrayList to print all the information of Stock 10) Call method printHash to print all the information of in sorted order of Symbol sorted order of Symbol 4/26/2018) to both ArraList and HashMap in sorted order of Symbol Stock in sorted order of Symbol Write a program to read data from the file stock.txt. for each line of data create an object of Stock class and store them in 1) ArrayList 2) a hash map as HashMap. The key will be the Symbol field (like IBM or CSCO) 3) Ask user to enter the symbol 4) Call a method searchArrayList(ArrayList, symbol) to search the ArrayList for the Symbol and return the price 5) Call a method searyHash(Hash,symbol) to search the Hash for the symbol and return the price 6) Call method printArrayList to print all the information of Stock 7) Call method printHash to print all the information of Stock in 8) Add one more Stock (ORCL, Oracle Corporation, 45.96, 9) Call method printArrayList to print all the information of Stock 10) Call method printHash to print all the information of in sorted order of Symbol sorted order of Symbol 4/26/2018) to both ArraList and HashMap in sorted order of Symbol Stock in sorted order of Symbol