Hsh

Author: 57c665bd37

01 March 2018

Views: 135

/**
* Pollution.java
*
* @author authorname
* Date: March 01, 2018
*/
public class Pollution {

/**
* Process a file whose name is passed through cmd arguments.
* display totals records processed and max pollution stats.
*
* @param args
*/
public static void main(String [] args) throws Exception {
//args = new String[1];
//args[0] = "data/kirkstall.csv";

if(args.length != 1) {
System.out.println("ERROR: no file name provided");
System.out.println("USage:");
System.out.println("java Pollution filename.csv");
return;
}

// Create data set
PollutionDataset ds = new PollutionDataset();
ds.readCSV(args[0]);

System.out.println(ds.size() + " records processed");
System.out.println("Max: " + ds.maxLevel());
}
}


Edit Code:

Please enter an edit code

Edit codes must be at least 20 characters

Share