public class Storm { //Attributes private String stormName; private int stormYear; private String stormStart; private String stormEnd; private int stormMag; /** * Constructor * * @param stormName * @param stormYear * @param stormStart * @param stormEnd * @param stormMag */ public Storm(String stormName, int stormYear, String stormStart, String stormEnd, int stormMag) { this.stormName = stormName; this.stormYear = stormYear; this.stormStart = stormStart; this.stormEnd = stormEnd; this.stormMag = stormMag; } /** * @return the stormName */ public String getStormName() { return stormName; } /** * @param stormName the stormName to set */ public void setStormName(String stormName) { this.stormName = stormName; } /** * @return the stormYear */ public int getStormYear() { return stormYear; } /** * @param stormYear the stormYear to set */ public void setStormYear(int stormYear) { this.stormYear = stormYear; } /** * @return the stormStart */ public String getStormStart() { return stormStart; } /** * @param stormStart the stormStart to set */ public void setStormStart(String stormStart) { this.stormStart = stormStart; } /** * @return the stormEnd */ public String getStormEnd() { return stormEnd; } /** * @param stormEnd the stormEnd to set */ public void setStormEnd(String stormEnd) { this.stormEnd = stormEnd; } /** * @return the stormMag */ public int getStormMag() { return stormMag; } /** * @param stormMag the stormMag to set */ public void setStormMag(int stormMag) { this.stormMag = stormMag; } @Override public String toString() { return \"\ \" + getStormYear() + \": \" + getStormName() + \" \" + ((getStormMag() == -1) ? \"(no info)\" : ((getStormMag() == 0) ? \"(tropical storm)\" : \"(hurricane level \" + getStormMag() + \")\")) + \": \" + ((getStormStart().equals(\"\")) ? \"(no start)\" : getStormStart().substring(0, 2) + \"/\" + getStormStart().substring(2)) + \" - \" + ((getStormEnd().equals(\"\")) ? \"(no end)\" : getStormEnd().substring(0, 2) + \"/\" + getStormEnd().substring(2)); } } import java.io.File; import java.io.FileNotFoundException; import java.util.Scanner; public class Database { private static final int MAX_SIZE = 50; //Attributes private Storm[] stormArr; private int count; /** * Constructor * Accepts a file and attempts to read it * Fills the storm array with the data */ public Database(File fileName) { //Initialize array this.stormArr = new Storm[MAX_SIZE]; this.count = 0; //Scanner to read from the file Scanner in = null; try { in = new Scanner(fileName); //Read data from the file while(in.hasNextLine()) { //Year of storm/ Name of storm/ mmdd storm started/ mmdd storm ended/ magnitude of storm String line = in.nextLine(); String[] data = line.replaceAll(\"/\", \"/ \").split(\"/\"); if(data.length < 5) System.out.println(\"Database entry not in the correct format: \" + line); //Add data to array this.stormArr[this.count] = new Storm(data[1].trim(), Integer.parseInt(data[0].trim()), data[2].trim(), data[3].trim(), (data[4].trim()..