/** * * * Driver class * Name: * Course: * Section: * Last Modified: * Known Bugs: */ import java.io.*; public class Driver { public static void main(String args[]) throws Exception { FileInput myFile = new FileInput("msft.txt"); double [] A = new double[365]; int count = 0; while (!myFile.eof()) { String temp = myFile.getString(); int k = temp.indexOf(" "); String date = temp.substring(0,k-1); String next = temp.substring(k); next = next.trim(); k = next.indexOf(" "); String hi = next.substring(0,k-1); next = next.substring(k); next = next.trim(); k = next.indexOf(" "); String lo = next.substring(0,k-1); next = next.substring(k); next = next.trim(); k = next.indexOf(" "); String closingPrice = next.substring(0,k-1); double price = Double.parseDouble(closingPrice); A[count++] = price; //System.out.println(price); } for (int i=0; i