Course Hero Logo

Hurricaneselector.java - import java.io.File import...

Course Hero uses AI to attempt to automatically extract content from documents to surface to you and others so you can study better, e.g., in search results, to enrich docs, and more. This preview shows page 1 - 2 out of 3 pages.

import java.io.File;import java.io.IOException;import java.util.Scanner;public class Hurricaneselector {public static void main(String[] args) throws IOException {//Declare variablesint arrayLength = 59;int index = 0;int windAverage = 0;int windMax = 0;int pressureAverage = 0;int pressureMax = 0;int categoryAverage = 0;int categoryMax = 0;int category1 = 0;int category2 = 0;int category3 = 0;int category4 = 0;int category5 = 0;//Year Arrayint[] year;year = new int[arrayLength];//Month ArrayString[] month;month = new String[arrayLength];//Pressure Arrayint[] pressure;pressure = new int[arrayLength];//Wind Knots Arrayint[] wind;wind = new int[arrayLength];//Name ArrayString[] name;name = new String[arrayLength];//Wind MPH Arraydouble[] windMPH;windMPH = new double[arrayLength];//Category Arrayint[] category;category = new int[arrayLength];int pressureMin = 0;int windMin = 0;try {File fileName = new File("D://hurricanedata.txt");//Read data from the fileScanner inFile = new Scanner(fileName);//Read data from the filewhile (inFile.hasNext()) {year[index] = inFile.nextInt();//

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 3 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Fall
Professor
N/A

Newly uploaded documents

Show More

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture