Question: can someone help fix my main code in java I am trying to get this output Disaster Name Type Year Strength Rating Scale ------------------------------------------------------------------------------------- Tri-State
can someone help fix my main code in java I am trying to get this output Disaster Name Type Year Strength Rating Scale ------------------------------------------------------------------------------------- Tri-State Tornado 1925 5.0 Fujita Scale: F0 to F5 Good Friday Earthquake Earthquake 1964 9.2 Richter Scale: 1.0 to 9.0 or greater Katrina Hurricane 2005 5.0 Saffir-Simpson Wind Scale: 1 to 5 Mount St. Helens Volcano 1980 5.0 Volcanic Explosivity Index: 0 to 8 Joplin Missouri Tornado 2011 5.0 Fujita Scale: F0 to F5 Andrew Hurricane 1992 5.0 Saffir-Simpson Wind Scale: 1 to 5 Colorado Springs Tornado 1979 3.0 Fujita Scale: F0 to F5 El-Reno Oklahoma Tornado 2013 5.0 Fujita Scale: F0 to F5 Disasters that are Storms -------------------------------------------- Number of Tornados: 3 Number of Hurricanes: 2 Tri-State --- Tornado --- 5.0 Katrina --- Hurricane --- 5.0 Joplin Missouri --- Tornado --- 5.0 Andrew --- Hurricane --- 5.0 El-Reno Oklahoma --- Tornado --- 5.0 public static void main(String[] args) throws IOException{ //reading/ creating scanner for the text file final String FileName = "Assignment1.txt"; File fileName = new File(FileName); Scanner disasterFile = new Scanner(fileName); //getting the number of disasters in the file int amountOfDisaster = disasterFile.nextInt(); //array for the disasters Disasters[] disasterArray = new Disasters[amountOfDisaster]; //create for loop to print for (int i=0; i Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
