public ArrayList<ITemperature> readDataFromFile(String fileName);
//read all data from the weather data file
This would be the interface. If given a file, how would I be able to read it and separate them into an array list and keep them in columns?
Ex(if file contained this, how can I do it):
Temperature, Year, Month_Avg, Country, Country_Code
1.62425, 2000, Jan, Afghanistan, AFG
1.92871, 2000, Feb, Afghanistan, AFG
7.48463, 2000, Mar, Afghanistan, AFG
This is what i have so far but idk how to get the file name input from the paramater.
public ArrayList<ITemperature> readDataFromFile(String fileName){
// read all data from the weather data file
File file = new File("C:\\Users\\JTPD_\\eclipse-workspace\\Climate Change Analysis\\data\\world_temp_2000-2016.csv");
BufferedReader br = new BufferedReader(new FileReader(file));
}