Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- carrier UA = new carrier("Us Airways", 100, 50);
- carrier Delta = new carrier("Delta", 100, 50);
- public static void main (String [] args) throws Exception{
- CSVReader reader = new CSVReader(new FileReader("delayed.csv"));
- String [] nextLine;
- String[][] flightData = new String[221][3];
- int i=0;
- while ((nextLine = reader.readNext()) != null) {
- for(int r = 0; r<2; r++){
- flightData[i][0] = nextLine[1];
- flightData[i][1] = nextLine[6];
- flightData[i][2] = nextLine[7];
- }
- i++;
- //System.out.println("Carrier: " + nextLine[1] + "ttTotal: " + nextLine[6] + "ttDelayed: " + nextLine[7] + "");
- }
- while(flightData != null){
- carrier
- }
- }
- List<Carrier> listCarrier = new ArrayList<Carrier>();
- while ((nextLine = reader.readNext()) != null) {
- listCarrier.add(new Carrier(nextLine[1], Integer.valueOf(nextLine[6]), Integer.valueOf(nextLine[7])));
- }
- Map<String, Carrier> listCarrier = new HashMap<String, Carrier>();
- Carrier carrier = new Carrier(nextLine[1], Integer.valueOf(nextLine[6]), Integer.valueOf(nextLine[7]));
- listCarrier .put(nextLine[1],carrier );
- //Here the key is the carrier name, and the value is the carrier object
- listCarrier.get("carrier_name")
- carrier* carrierList = new carrier[10];
- for (int i = 0; i < 10; i++)
- carrierList[i] = new carrier(arguments);
Add Comment
Please, Sign In to add comment