/
FlightAnalysisTest.java
650 lines (604 loc) · 43.9 KB
/
FlightAnalysisTest.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;
import static org.junit.Assert.*;
public class FlightAnalysisTest {
@Rule
public TemporaryFolder folder = new TemporaryFolder();
@Test
public void parseDataGoodDataTest() throws IOException {
// Invoke method
ArrayList<Flight> actual = FlightAnalysis.parseData(generateGivenGoodInputFile());
// Check results
assertEquals("When checking the ArrayList returned from the parseData method given a file with all valid input data, we",goodInputArrayList(),actual);
}
@Test
public void calcBestFareGoodDataTest(){
Flight expected = new Flight("2017","Boise, ID","Spokane, WA",106.6399809,287);
assertEquals("When checking the ArrayList returned from the calcBestFare method given an ArrayList of good flight data, we",expected,FlightAnalysis.calcBestFare(goodInputArrayList()));
}
@Test
public void removeDataGoodDataTest(){
ArrayList<Flight> goodInput = goodInputArrayList();
FlightAnalysis.removeData(goodInput,toRemoveArrayList());
assertEquals("When checking the ArrayList returned from the removeData method given an ArrayList of good flight data, we",goodInputDataRemovedArrayList(),goodInput);
}
@Test
public void calcBestFarePerMileGoodDataTest(){
Flight expected = new Flight("2018","Asheville, NC","Miami, FL (Metropolitan Area)",119.6646127,677);
assertEquals("When checking the ArrayList returned from the calcBestFarePerMile method given an ArrayList of good flight data, we",expected,FlightAnalysis.calcBestFarePerMile(goodInputArrayList()));
}
@Test
public void writeOutGoodData() throws IOException {
final String OUTPUT_FILENAME = "output.txt";
// Create input and output files and populate input file
File outputFile = folder.newFile(OUTPUT_FILENAME);
// Invoke method
FlightAnalysis.writeOutData(goodInputArrayList(), outputFile);
// Check results
assertTrue("Output file does not exist", outputFile.exists());
Scanner outputScan = new Scanner(outputFile);
Scanner expectedScan = new Scanner(generateExpectedGoodOutputFile());
int i = 1;
while (outputScan.hasNextLine()){
assertEquals("When checking the output file produced by writeOutData given an ArrayList of good data, at line " +i+ " we",expectedScan.nextLine(),outputScan.nextLine());
i++;
}
outputScan.close();
expectedScan.close();
}
@Test
public void writeOutBadData() throws IOException {
final String OUTPUT_FILENAME = "output.txt";
// Create input and output files and populate input file
File outputFile = folder.newFile(OUTPUT_FILENAME);
// Invoke method
FlightAnalysis.writeOutData(badInputArrayList(), outputFile);
// Check results
assertTrue("Output file does not exist", outputFile.exists());
Scanner outputScan = new Scanner(outputFile);
Scanner expectedScan = new Scanner(generateExpectedBadOutputFile());
int i = 1;
while (outputScan.hasNextLine()){
assertEquals("When checking the output file produced by writeOutData given an ArrayList of good data, at line " +i+ " we",expectedScan.nextLine(),outputScan.nextLine());
i++;
}
outputScan.close();
expectedScan.close();
}
@Test
public void parseDataBadDataTest() throws IOException {
// Invoke method
ArrayList<Flight> actual = FlightAnalysis.parseData(generateGivenBadInputFile());
// Check results
assertEquals("When checking the ArrayList returned from the parseData method given a file with some invalid input data, we",badInputArrayList(),actual);
}
@Test
public void calcBestFareBadDataTest(){
Flight expected = new Flight("2018","Charlotte, NC","St. Louis, MO",0.0,0);
assertEquals("When checking the ArrayList returned from the calcBestFare method given an ArrayList generated from FlightBadData.txt, we",expected,FlightAnalysis.calcBestFare(badInputArrayList()));
}
@Test
public void removeDataBadDataTest(){
ArrayList<Flight> badInput = badInputArrayList();
FlightAnalysis.removeData(badInput,toRemoveArrayList());
assertEquals("When checking the ArrayList returned from the removeData method given an ArrayList generated from FlightBadData.txt, we",badInputDataRemovedArrayList(),badInput);
}
@Test
public void calcBestFarePerMileBadDataTest(){
Flight expected = new Flight("2018","Asheville, NC","Miami, FL (Metropolitan Area)",119.6646127,677);
assertEquals("When checking the ArrayList returned from the calcBestFarePerMile method given an ArrayList generated from FlightBadData.txt, we",expected,FlightAnalysis.calcBestFarePerMile(badInputArrayList()));
}
private File generateGivenGoodInputFile() throws IOException {
final String INPUT_FILENAME = "foo.txt";
File inputFile = folder.newFile(INPUT_FILENAME);
PrintWriter write = new PrintWriter(inputFile);
write.print("Year;city1;city2;mkt_fare;Distance;\n" +
"2018;Asheville, NC;Miami, FL (Metropolitan Area);119.6646127;677;\n" +
"2018;Asheville, NC;Tampa, FL (Metropolitan Area);111.1095983;514;\n" +
"2018;Atlanta, GA (Metropolitan Area);Cincinnati, OH;273.9105411;377;\n" +
"2018;Atlanta, GA (Metropolitan Area);Memphis, TN;289.8798238;332;\n" +
"2018;Boise, ID;Seattle, WA;131.3517678;399;\n" +
"2018;Boise, ID;Spokane, WA;110.8682953;287;\n" +
"2018;Boise, ID;Sacramento, CA;129.1509692;437;\n" +
"2018;Boston, MA (Metropolitan Area);Buffalo, NY;130.4956899;395;\n" +
"2018;Boston, MA (Metropolitan Area);Richmond, VA;136.4161655;474;\n" +
"2018;Buffalo, NY;New York City, NY (Metropolitan Area);136.4699697;292;\n" +
"2018;Charlotte, NC;St. Louis, MO;291.2241703;575;\n" +
"2018;Charlotte, NC;Detroit, MI;264.3863046;500;\n" +
"2018;Charlotte, NC;Tampa, FL (Metropolitan Area);290.3426771;507;\n" +
"2018;Charlotte, NC;Memphis, TN;284.7862224;511;\n" +
"2018;Chicago, IL;Syracuse, NY;260.6205682;607;\n" +
"2018;Chicago, IL;Tulsa, OK;271.9742993;585;\n" +
"2018;Chicago, IL;Cincinnati, OH;133.352732;270;\n" +
"2018;Chicago, IL;Richmond, VA;262.2001325;642;\n" +
"2018;Cincinnati, OH;Minneapolis/St. Paul, MN;262.9060018;334;\n" +
"2017;Asheville, NC;Miami, FL (Metropolitan Area);128.3915332;677;\n" +
"2017;Asheville, NC;Tampa, FL (Metropolitan Area);124.4519219;514;\n" +
"2017;Atlanta, GA (Metropolitan Area);Cincinnati, OH;313.655394;377;\n" +
"2017;Atlanta, GA (Metropolitan Area);Memphis, TN;274.8223261;332;\n" +
"2017;Boise, ID;Seattle, WA;129.4190566;399;\n" +
"2017;Boise, ID;Spokane, WA;106.6399809;287;\n" +
"2017;Boise, ID;Sacramento, CA;129.9119902;437;\n" +
"2017;Boston, MA (Metropolitan Area);Richmond, VA;132.355884;395;\n" +
"2017;Boston, MA (Metropolitan Area);Buffalo, NY;132.4186695;474;\n" +
"2017;Buffalo, NY;New York City, NY (Metropolitan Area);117.7032929;292;\n" +
"2017;Charlotte, NC;St. Louis, MO;273.6228611;575;\n" +
"2017;Charlotte, NC;Detroit, MI;262.8762495;500;\n" +
"2017;Charlotte, NC;Tampa, FL (Metropolitan Area);276.6002795;507;\n" +
"2017;Charlotte, NC;Memphis, TN;269.731107;511;\n" +
"2017;Chicago, IL;Richmond, VA;262.4844604;607;\n" +
"2017;Chicago, IL;Tulsa, OK;270.3571121;585;\n" +
"2017;Chicago, IL;Syracuse, NY;290.8316435;270;\n" +
"2017;Chicago, IL;Cincinnati, OH;124.3163743;642;\n" +
"2017;Cincinnati, OH;Minneapolis/St. Paul, MN;306.9397207;334;\n" +
"2016;Asheville, NC;Miami, FL (Metropolitan Area);129.2055405;677;\n" +
"2016;Asheville, NC;Tampa, FL (Metropolitan Area);126.5900629;514;\n" +
"2016;Atlanta, GA (Metropolitan Area);Cincinnati, OH;298.0553139;377;\n" +
"2016;Atlanta, GA (Metropolitan Area);Memphis, TN;306.4386275;332;\n" +
"2016;Boise, ID;Seattle, WA;128.5387179;399;\n" +
"2016;Boise, ID;Spokane, WA;114.2404508;287;\n" +
"2016;Boise, ID;Sacramento, CA;119.774425;437;\n" +
"2016;Boston, MA (Metropolitan Area);Richmond, VA;136.3048831;395;\n" +
"2016;Boston, MA (Metropolitan Area);Buffalo, NY;139.2092115;474;\n" +
"2016;Buffalo, NY;New York City, NY (Metropolitan Area);138.6866248;292;\n" +
"2016;Charlotte, NC;St. Louis, MO;275.0473414;575;\n" +
"2016;Charlotte, NC;Detroit, MI;328.1736089;500;\n" +
"2016;Charlotte, NC;Tampa, FL (Metropolitan Area);269.3827727;507;\n" +
"2016;Charlotte, NC;Memphis, TN;261.5784123;511;\n" +
"2016;Chicago, IL;Richmond, VA;295.4702007;607;\n" +
"2016;Chicago, IL;Cincinnati, OH;267.2074027;585;\n" +
"2016;Chicago, IL;Tulsa, OK;270.4238455;270;\n" +
"2016;Chicago, IL;Syracuse, NY;270.42;642;\n" +
"2016;Cincinnati, OH;Minneapolis/St. Paul, MN;375.9145278;334;");
write.close();
return inputFile;
}
private File generateExpectedGoodOutputFile() throws IOException {
final String INPUT_FILENAME = "foo.txt";
File inputFile = folder.newFile(INPUT_FILENAME);
PrintWriter write = new PrintWriter(inputFile);
write.print(
"2018 Asheville, NC Miami, FL (Metropolitan Area) 119.6646127 677\n" +
"2018 Asheville, NC Tampa, FL (Metropolitan Area) 111.1095983 514\n" +
"2018 Atlanta, GA (Metropolitan Area) Cincinnati, OH 273.9105411 377\n" +
"2018 Atlanta, GA (Metropolitan Area) Memphis, TN 289.8798238 332\n" +
"2018 Boise, ID Seattle, WA 131.3517678 399\n" +
"2018 Boise, ID Spokane, WA 110.8682953 287\n" +
"2018 Boise, ID Sacramento, CA 129.1509692 437\n" +
"2018 Boston, MA (Metropolitan Area) Buffalo, NY 130.4956899 395\n" +
"2018 Boston, MA (Metropolitan Area) Richmond, VA 136.4161655 474\n" +
"2018 Buffalo, NY New York City, NY (Metropolitan Area) 136.4699697 292\n" +
"2018 Charlotte, NC St. Louis, MO 291.2241703 575\n" +
"2018 Charlotte, NC Detroit, MI 264.3863046 500\n" +
"2018 Charlotte, NC Tampa, FL (Metropolitan Area) 290.3426771 507\n" +
"2018 Charlotte, NC Memphis, TN 284.7862224 511\n" +
"2018 Chicago, IL Syracuse, NY 260.6205682 607\n" +
"2018 Chicago, IL Tulsa, OK 271.9742993 585\n" +
"2018 Chicago, IL Cincinnati, OH 133.352732 270\n" +
"2018 Chicago, IL Richmond, VA 262.2001325 642\n" +
"2018 Cincinnati, OH Minneapolis/St. Paul, MN 262.9060018 334\n" +
"2017 Asheville, NC Miami, FL (Metropolitan Area) 128.3915332 677\n" +
"2017 Asheville, NC Tampa, FL (Metropolitan Area) 124.4519219 514\n" +
"2017 Atlanta, GA (Metropolitan Area) Cincinnati, OH 313.655394 377\n" +
"2017 Atlanta, GA (Metropolitan Area) Memphis, TN 274.8223261 332\n" +
"2017 Boise, ID Seattle, WA 129.4190566 399\n" +
"2017 Boise, ID Spokane, WA 106.6399809 287\n" +
"2017 Boise, ID Sacramento, CA 129.9119902 437\n" +
"2017 Boston, MA (Metropolitan Area) Richmond, VA 132.355884 395\n" +
"2017 Boston, MA (Metropolitan Area) Buffalo, NY 132.4186695 474\n" +
"2017 Buffalo, NY New York City, NY (Metropolitan Area) 117.7032929 292\n" +
"2017 Charlotte, NC St. Louis, MO 273.6228611 575\n" +
"2017 Charlotte, NC Detroit, MI 262.8762495 500\n" +
"2017 Charlotte, NC Tampa, FL (Metropolitan Area) 276.6002795 507\n" +
"2017 Charlotte, NC Memphis, TN 269.731107 511\n" +
"2017 Chicago, IL Richmond, VA 262.4844604 607\n" +
"2017 Chicago, IL Tulsa, OK 270.3571121 585\n" +
"2017 Chicago, IL Syracuse, NY 290.8316435 270\n" +
"2017 Chicago, IL Cincinnati, OH 124.3163743 642\n" +
"2017 Cincinnati, OH Minneapolis/St. Paul, MN 306.9397207 334\n" +
"2016 Asheville, NC Miami, FL (Metropolitan Area) 129.2055405 677\n" +
"2016 Asheville, NC Tampa, FL (Metropolitan Area) 126.5900629 514\n" +
"2016 Atlanta, GA (Metropolitan Area) Cincinnati, OH 298.0553139 377\n" +
"2016 Atlanta, GA (Metropolitan Area) Memphis, TN 306.4386275 332\n" +
"2016 Boise, ID Seattle, WA 128.5387179 399\n" +
"2016 Boise, ID Spokane, WA 114.2404508 287\n" +
"2016 Boise, ID Sacramento, CA 119.774425 437\n" +
"2016 Boston, MA (Metropolitan Area) Richmond, VA 136.3048831 395\n" +
"2016 Boston, MA (Metropolitan Area) Buffalo, NY 139.2092115 474\n" +
"2016 Buffalo, NY New York City, NY (Metropolitan Area) 138.6866248 292\n" +
"2016 Charlotte, NC St. Louis, MO 275.0473414 575\n" +
"2016 Charlotte, NC Detroit, MI 328.1736089 500\n" +
"2016 Charlotte, NC Tampa, FL (Metropolitan Area) 269.3827727 507\n" +
"2016 Charlotte, NC Memphis, TN 261.5784123 511\n" +
"2016 Chicago, IL Richmond, VA 295.4702007 607\n" +
"2016 Chicago, IL Cincinnati, OH 267.2074027 585\n" +
"2016 Chicago, IL Tulsa, OK 270.4238455 270\n" +
"2016 Chicago, IL Syracuse, NY 270.42 642\n" +
"2016 Cincinnati, OH Minneapolis/St. Paul, MN 375.9145278 334"
);
write.close();
return inputFile;
}
private File generateExpectedBadOutputFile() throws IOException {
final String INPUT_FILENAME = "foo.txt";
File inputFile = folder.newFile(INPUT_FILENAME);
PrintWriter write = new PrintWriter(inputFile);
write.print(
"2018 Asheville, NC Miami, FL (Metropolitan Area) 119.6646127 677\n" +
"2018 Asheville, NC Tampa, FL (Metropolitan Area) 111.1095983 514\n" +
"2018 Atlanta, GA (Metropolitan Area) Cincinnati, OH 273.9105411 377\n" +
"2018 Atlanta, GA (Metropolitan Area) Memphis, TN 289.8798238 332\n" +
"2018 Boise, ID Seattle, WA 131.3517678 399\n" +
"2018 Boise, ID Spokane, WA 110.8682953 287\n" +
"2018 Boise, ID Sacramento, CA 129.1509692 437\n" +
"2018 Boston, MA (Metropolitan Area) Buffalo, NY 130.4956899 395\n" +
"2018 Boston, MA (Metropolitan Area) Richmond, VA 136.4161655 474\n" +
"2018 Buffalo, NY New York City, NY (Metropolitan Area) 136.4699697 292\n" +
"2018 Charlotte, NC St. Louis, MO 0.0 0\n" +
"2018 Charlotte, NC Detroit, MI 264.3863046 500\n" +
"2018 Charlotte, NC Tampa, FL (Metropolitan Area) 290.3426771 507\n" +
"2018 Charlotte, NC Memphis, TN 284.7862224 511\n" +
"2018 Chicago, IL Syracuse, NY 260.6205682 607\n" +
"2018 Chicago, IL Tulsa, OK 271.9742993 585\n" +
"2018 Chicago, IL Cincinnati, OH 133.352732 270\n" +
"2018 Chicago, IL Richmond, VA 262.2001325 642\n" +
"2018 Cincinnati, OH Minneapolis/St. Paul, MN 262.9060018 334\n" +
"2017 Asheville, NC Miami, FL (Metropolitan Area) 0.0 0\n" +
"2017 Asheville, NC Tampa, FL (Metropolitan Area) 124.4519219 514\n" +
"2017 Atlanta, GA (Metropolitan Area) Cincinnati, OH 313.655394 377\n" +
"2017 Atlanta, GA (Metropolitan Area) Memphis, TN 274.8223261 332\n" +
"2017 Boise, ID Seattle, WA 129.4190566 399\n" +
"2017 Boise, ID Spokane, WA 106.6399809 287\n" +
"2017 Boise, ID Sacramento, CA 129.9119902 437\n" +
"2017 Boston, MA (Metropolitan Area) Richmond, VA 132.355884 395\n" +
"2017 Boston, MA (Metropolitan Area) Buffalo, NY 132.4186695 474\n" +
"2017 Buffalo, NY New York City, NY (Metropolitan Area) 0.0 0\n" +
"2017 Charlotte, NC St. Louis, MO 273.6228611 575\n" +
"2017 Charlotte, NC Detroit, MI 262.8762495 500\n" +
"2017 Charlotte, NC Tampa, FL (Metropolitan Area) 276.6002795 507\n" +
"2017 Charlotte, NC Memphis, TN 0.0 0\n" +
"2017 Chicago, IL Richmond, VA 262.4844604 607\n" +
"2017 Chicago, IL Tulsa, OK 270.3571121 585\n" +
"2017 Chicago, IL Syracuse, NY 290.8316435 270\n" +
"2017 Chicago, IL Cincinnati, OH 124.3163743 642\n" +
"2017 Cincinnati, OH Minneapolis/St. Paul, MN 306.9397207 334\n" +
"2016 Asheville, NC Miami, FL (Metropolitan Area) 129.2055405 677\n" +
"2016 Asheville, NC Tampa, FL (Metropolitan Area) 126.5900629 514\n" +
"2016 Atlanta, GA (Metropolitan Area) Cincinnati, OH 298.0553139 377\n" +
"2016 Atlanta, GA (Metropolitan Area) Memphis, TN 306.4386275 332\n" +
"2016 Boise, ID Seattle, WA 128.5387179 399\n" +
"2016 Boise, ID Spokane, WA 114.2404508 287\n" +
"2016 Boise, ID Sacramento, CA 119.774425 437\n" +
"2016 Boston, MA (Metropolitan Area) Richmond, VA 136.3048831 395\n" +
"2016 Boston, MA (Metropolitan Area) Buffalo, NY 0.0 0\n" +
"2016 Buffalo, NY New York City, NY (Metropolitan Area) 138.6866248 292\n" +
"2016 Charlotte, NC St. Louis, MO 275.0473414 575\n" +
"2016 Charlotte, NC Detroit, MI 328.1736089 500\n" +
"2016 Charlotte, NC Tampa, FL (Metropolitan Area) 269.3827727 507\n" +
"2016 Charlotte, NC Memphis, TN 261.5784123 511\n" +
"2016 Chicago, IL Richmond, VA 295.4702007 607\n" +
"2016 Chicago, IL Cincinnati, OH 267.2074027 585\n" +
"2016 Chicago, IL Tulsa, OK 0.0 0\n" +
"2016 Chicago, IL Syracuse, NY 270.42 642\n" +
"2016 Cincinnati, OH Minneapolis/St. Paul, MN 375.9145278 334"
);
write.close();
return inputFile;
}
private File generateGivenBadInputFile() throws IOException {
final String INPUT_FILENAME = "foo.txt";
File inputFile = folder.newFile(INPUT_FILENAME);
PrintWriter write = new PrintWriter(inputFile);
write.print("Year;city1;city2;mkt_fare;Distance;\n" +
"2018;Asheville, NC;Miami, FL (Metropolitan Area);119.6646127;677;\n" +
"2018;Asheville, NC;Tampa, FL (Metropolitan Area);111.1095983;514;\n" +
"2018;Atlanta, GA (Metropolitan Area);Cincinnati, OH;273.9105411;377;\n" +
"2018;Atlanta, GA (Metropolitan Area);Memphis, TN;289.8798238;332;\n" +
"2018;Boise, ID;Seattle, WA;131.3517678;399;\n" +
"2018;Boise, ID;Spokane, WA;110.8682953;287;\n" +
"2018;Boise, ID;Sacramento, CA;129.1509692;437;\n" +
"2018;Boston, MA (Metropolitan Area);Buffalo, NY;130.4956899;395;\n" +
"2018;Boston, MA (Metropolitan Area);Richmond, VA;136.4161655;474;\n" +
"2018;Buffalo, NY;New York City, NY (Metropolitan Area);136.4699697;292;\n" +
"2018;Charlotte, NC;St. Louis, MO;-291.224.1703;c;\n" +
"2018;Charlotte, NC;Detroit, MI;264.3863046;500;\n" +
"2018;Charlotte, NC;Tampa, FL (Metropolitan Area);290.3426771;507;\n" +
"2018;Charlotte, NC;Memphis, TN;284.7862224;511;\n" +
"2018;Chicago, IL;Syracuse, NY;260.6205682;607;\n" +
"2018;Chicago, IL;Tulsa, OK;271.9742993;585;\n" +
"2018;Chicago, IL;Cincinnati, OH;133.352732;270;\n" +
"2018;Chicago, IL;Richmond, VA;262.2001325;642;\n" +
"2018;Cincinnati, OH;Minneapolis/St. Paul, MN;262.9060018;334;\n" +
"2017;Asheville, NC;Miami, FL (Metropolitan Area);hello;-677;\n" +
"2017;Asheville, NC;Tampa, FL (Metropolitan Area);124.4519219;514;\n" +
"2017;Atlanta, GA (Metropolitan Area);Cincinnati, OH;313.655394;377;\n" +
"2017;Atlanta, GA (Metropolitan Area);Memphis, TN;274.8223261;332;\n" +
"2017;Boise, ID;Seattle, WA;129.4190566;399;\n" +
"2017;Boise, ID;Spokane, WA;106.6399809;287;\n" +
"2017;Boise, ID;Sacramento, CA;129.9119902;437;\n" +
"2017;Boston, MA (Metropolitan Area);Richmond, VA;132.355884;395;\n" +
"2017;Boston, MA (Metropolitan Area);Buffalo, NY;132.4186695;474;\n" +
"2017;Buffalo, NY;New York City, NY (Metropolitan Area);bb;cc;\n" +
"2017;Charlotte, NC;St. Louis, MO;273.6228611;575;\n" +
"2017;Charlotte, NC;Detroit, MI;262.8762495;500;\n" +
"2017;Charlotte, NC;Tampa, FL (Metropolitan Area);276.6002795;507;\n" +
"2017;Charlotte, NC;Memphis, TN;-2;0;\n" +
"2017;Chicago, IL;Richmond, VA;262.4844604;607;\n" +
"2017;Chicago, IL;Tulsa, OK;270.3571121;585;\n" +
"2017;Chicago, IL;Syracuse, NY;290.8316435;270;\n" +
"2017;Chicago, IL;Cincinnati, OH;124.3163743;642;\n" +
"2017;Cincinnati, OH;Minneapolis/St. Paul, MN;306.9397207;334;\n" +
"2016;Asheville, NC;Miami, FL (Metropolitan Area);129.2055405;677;\n" +
"2016;Asheville, NC;Tampa, FL (Metropolitan Area);126.5900629;514;\n" +
"2016;Atlanta, GA (Metropolitan Area);Cincinnati, OH;298.0553139;377;\n" +
"2016;Atlanta, GA (Metropolitan Area);Memphis, TN;306.4386275;332;\n" +
"2016;Boise, ID;Seattle, WA;128.5387179;399;\n" +
"2016;Boise, ID;Spokane, WA;114.2404508;287;\n" +
"2016;Boise, ID;Sacramento, CA;119.774425;437;\n" +
"2016;Boston, MA (Metropolitan Area);Richmond, VA;136.3048831;395;\n" +
"2016;Boston, MA (Metropolitan Area);Buffalo, NY;-139.2092115;happy;\n" +
"2016;Buffalo, NY;New York City, NY (Metropolitan Area);138.6866248;292;\n" +
"2016;Charlotte, NC;St. Louis, MO;275.0473414;575;\n" +
"2016;Charlotte, NC;Detroit, MI;328.1736089;500;\n" +
"2016;Charlotte, NC;Tampa, FL (Metropolitan Area);269.3827727;507;\n" +
"2016;Charlotte, NC;Memphis, TN;261.5784123;511;\n" +
"2016;Chicago, IL;Richmond, VA;295.4702007;607;\n" +
"2016;Chicago, IL;Cincinnati, OH;267.2074027;585;\n" +
"2016;Chicago, IL;Tulsa, OK;dd;-4;\n" +
"2016;Chicago, IL;Syracuse, NY;270.42;642;\n" +
"2016;Cincinnati, OH;Minneapolis/St. Paul, MN;375.9145278;334;");
write.close();
return inputFile;
}
private ArrayList<Flight> toRemoveArrayList(){
Flight[] temp = {
new Flight("2018","Atlanta, GA (Metropolitan Area)","Memphis, TN",289.8798238,332),
new Flight("2018","Boston, MA (Metropolitan Area)","Buffalo, NY",130.4956899,395),
new Flight("2017","Charlotte, NC","St. Louis, MO",273.6228611,575),
new Flight("2017","Cincinnati, OH","Minneapolis/St. Paul, MN",306.9397207,334),
new Flight("2016","Asheville, NC","Miami, FL (Metropolitan Area)",129.2055405,677),
new Flight("2016","Buffalo, NY","New York City, NY (Metropolitan Area)",138.6866248,292)
};
return new ArrayList<>(Arrays.asList(temp));
}
private ArrayList<Flight> goodInputArrayList(){
Flight[] temp = {new Flight("2018", "Asheville, NC", "Miami, FL (Metropolitan Area)", 119.6646127, 677),
new Flight("2018", "Asheville, NC", "Tampa, FL (Metropolitan Area)", 111.1095983, 514),
new Flight("2018", "Atlanta, GA (Metropolitan Area)", "Cincinnati, OH", 273.9105411, 377),
new Flight("2018", "Atlanta, GA (Metropolitan Area)", "Memphis, TN", 289.8798238, 332),
new Flight("2018", "Boise, ID", "Seattle, WA", 131.3517678, 399),
new Flight("2018", "Boise, ID", "Spokane, WA", 110.8682953, 287),
new Flight("2018", "Boise, ID", "Sacramento, CA", 129.1509692, 437),
new Flight("2018", "Boston, MA (Metropolitan Area)", "Buffalo, NY", 130.4956899, 395),
new Flight("2018", "Boston, MA (Metropolitan Area)", "Richmond, VA", 136.4161655, 474),
new Flight("2018", "Buffalo, NY", "New York City, NY (Metropolitan Area)", 136.4699697, 292),
new Flight("2018", "Charlotte, NC", "St. Louis, MO", 291.2241703, 575),
new Flight("2018", "Charlotte, NC", "Detroit, MI", 264.3863046, 500),
new Flight("2018", "Charlotte, NC", "Tampa, FL (Metropolitan Area)", 290.3426771, 507),
new Flight("2018", "Charlotte, NC", "Memphis, TN", 284.7862224, 511),
new Flight("2018", "Chicago, IL", "Syracuse, NY", 260.6205682, 607),
new Flight("2018", "Chicago, IL", "Tulsa, OK", 271.9742993, 585),
new Flight("2018", "Chicago, IL", "Cincinnati, OH", 133.352732, 270),
new Flight("2018", "Chicago, IL", "Richmond, VA", 262.2001325, 642),
new Flight("2018", "Cincinnati, OH", "Minneapolis/St. Paul, MN", 262.9060018, 334),
new Flight("2017", "Asheville, NC", "Miami, FL (Metropolitan Area)", 128.3915332, 677),
new Flight("2017", "Asheville, NC", "Tampa, FL (Metropolitan Area)", 124.4519219, 514),
new Flight("2017", "Atlanta, GA (Metropolitan Area)", "Cincinnati, OH", 313.655394, 377),
new Flight("2017", "Atlanta, GA (Metropolitan Area)", "Memphis, TN", 274.8223261, 332),
new Flight("2017", "Boise, ID", "Seattle, WA", 129.4190566, 399),
new Flight("2017", "Boise, ID", "Spokane, WA", 106.6399809, 287),
new Flight("2017", "Boise, ID", "Sacramento, CA", 129.9119902, 437),
new Flight("2017", "Boston, MA (Metropolitan Area)", "Richmond, VA", 132.355884, 395),
new Flight("2017", "Boston, MA (Metropolitan Area)", "Buffalo, NY", 132.4186695, 474),
new Flight("2017", "Buffalo, NY", "New York City, NY (Metropolitan Area)", 117.7032929, 292),
new Flight("2017", "Charlotte, NC", "St. Louis, MO", 273.6228611, 575),
new Flight("2017", "Charlotte, NC", "Detroit, MI", 262.8762495, 500),
new Flight("2017", "Charlotte, NC", "Tampa, FL (Metropolitan Area)", 276.6002795, 507),
new Flight("2017", "Charlotte, NC", "Memphis, TN", 269.731107, 511),
new Flight("2017", "Chicago, IL", "Richmond, VA", 262.4844604, 607),
new Flight("2017", "Chicago, IL", "Tulsa, OK", 270.3571121, 585),
new Flight("2017", "Chicago, IL", "Syracuse, NY", 290.8316435, 270),
new Flight("2017", "Chicago, IL", "Cincinnati, OH", 124.3163743, 642),
new Flight("2017", "Cincinnati, OH", "Minneapolis/St. Paul, MN", 306.9397207, 334),
new Flight("2016", "Asheville, NC", "Miami, FL (Metropolitan Area)", 129.2055405, 677),
new Flight("2016", "Asheville, NC", "Tampa, FL (Metropolitan Area)", 126.5900629, 514),
new Flight("2016", "Atlanta, GA (Metropolitan Area)", "Cincinnati, OH", 298.0553139, 377),
new Flight("2016", "Atlanta, GA (Metropolitan Area)", "Memphis, TN", 306.4386275, 332),
new Flight("2016", "Boise, ID", "Seattle, WA", 128.5387179, 399),
new Flight("2016", "Boise, ID", "Spokane, WA", 114.2404508, 287),
new Flight("2016", "Boise, ID", "Sacramento, CA", 119.774425, 437),
new Flight("2016", "Boston, MA (Metropolitan Area)", "Richmond, VA", 136.3048831, 395),
new Flight("2016", "Boston, MA (Metropolitan Area)", "Buffalo, NY", 139.2092115, 474),
new Flight("2016", "Buffalo, NY", "New York City, NY (Metropolitan Area)", 138.6866248, 292),
new Flight("2016", "Charlotte, NC", "St. Louis, MO", 275.0473414, 575),
new Flight("2016", "Charlotte, NC", "Detroit, MI", 328.1736089, 500),
new Flight("2016", "Charlotte, NC", "Tampa, FL (Metropolitan Area)", 269.3827727, 507),
new Flight("2016", "Charlotte, NC", "Memphis, TN", 261.5784123, 511),
new Flight("2016", "Chicago, IL", "Richmond, VA", 295.4702007, 607),
new Flight("2016", "Chicago, IL", "Cincinnati, OH", 267.2074027, 585),
new Flight("2016", "Chicago, IL", "Tulsa, OK", 270.4238455, 270),
new Flight("2016", "Chicago, IL", "Syracuse, NY", 270.42, 642),
new Flight("2016", "Cincinnati, OH", "Minneapolis/St. Paul, MN", 375.9145278, 334)};
return new ArrayList<>(Arrays.asList(temp));
}
private ArrayList<Flight> goodInputDataRemovedArrayList(){
Flight[] temp =
{new Flight("2018", "Asheville, NC", "Miami, FL (Metropolitan Area)", 119.6646127, 677),
new Flight("2018", "Asheville, NC", "Tampa, FL (Metropolitan Area)", 111.1095983, 514),
new Flight("2018", "Atlanta, GA (Metropolitan Area)", "Cincinnati, OH", 273.9105411, 377),
new Flight("2018", "Boise, ID", "Seattle, WA", 131.3517678, 399),
new Flight("2018", "Boise, ID", "Spokane, WA", 110.8682953, 287),
new Flight("2018", "Boise, ID", "Sacramento, CA", 129.1509692, 437),
new Flight("2018", "Boston, MA (Metropolitan Area)", "Richmond, VA", 136.4161655, 474),
new Flight("2018", "Buffalo, NY", "New York City, NY (Metropolitan Area)", 136.4699697, 292),
new Flight("2018", "Charlotte, NC", "St. Louis, MO", 291.2241703, 575),
new Flight("2018", "Charlotte, NC", "Detroit, MI", 264.3863046, 500),
new Flight("2018", "Charlotte, NC", "Tampa, FL (Metropolitan Area)", 290.3426771, 507),
new Flight("2018", "Charlotte, NC", "Memphis, TN", 284.7862224, 511),
new Flight("2018", "Chicago, IL", "Syracuse, NY", 260.6205682, 607),
new Flight("2018", "Chicago, IL", "Tulsa, OK", 271.9742993, 585),
new Flight("2018", "Chicago, IL", "Cincinnati, OH", 133.352732, 270),
new Flight("2018", "Chicago, IL", "Richmond, VA", 262.2001325, 642),
new Flight("2018", "Cincinnati, OH", "Minneapolis/St. Paul, MN", 262.9060018, 334),
new Flight("2017", "Asheville, NC", "Miami, FL (Metropolitan Area)", 128.3915332, 677),
new Flight("2017", "Asheville, NC", "Tampa, FL (Metropolitan Area)", 124.4519219, 514),
new Flight("2017", "Atlanta, GA (Metropolitan Area)", "Cincinnati, OH", 313.655394, 377),
new Flight("2017", "Atlanta, GA (Metropolitan Area)", "Memphis, TN", 274.8223261, 332),
new Flight("2017", "Boise, ID", "Seattle, WA", 129.4190566, 399),
new Flight("2017", "Boise, ID", "Spokane, WA", 106.6399809, 287),
new Flight("2017", "Boise, ID", "Sacramento, CA", 129.9119902, 437),
new Flight("2017", "Boston, MA (Metropolitan Area)", "Richmond, VA", 132.355884, 395),
new Flight("2017", "Boston, MA (Metropolitan Area)", "Buffalo, NY", 132.4186695, 474),
new Flight("2017", "Buffalo, NY", "New York City, NY (Metropolitan Area)", 117.7032929, 292),
new Flight("2017", "Charlotte, NC", "Detroit, MI", 262.8762495, 500),
new Flight("2017", "Charlotte, NC", "Tampa, FL (Metropolitan Area)", 276.6002795, 507),
new Flight("2017", "Charlotte, NC", "Memphis, TN", 269.731107, 511),
new Flight("2017", "Chicago, IL", "Richmond, VA", 262.4844604, 607),
new Flight("2017", "Chicago, IL", "Tulsa, OK", 270.3571121, 585),
new Flight("2017", "Chicago, IL", "Syracuse, NY", 290.8316435, 270),
new Flight("2017", "Chicago, IL", "Cincinnati, OH", 124.3163743, 642),
new Flight("2016", "Asheville, NC", "Tampa, FL (Metropolitan Area)", 126.5900629, 514),
new Flight("2016", "Atlanta, GA (Metropolitan Area)", "Cincinnati, OH", 298.0553139, 377),
new Flight("2016", "Atlanta, GA (Metropolitan Area)", "Memphis, TN", 306.4386275, 332),
new Flight("2016", "Boise, ID", "Seattle, WA", 128.5387179, 399),
new Flight("2016", "Boise, ID", "Spokane, WA", 114.2404508, 287),
new Flight("2016", "Boise, ID", "Sacramento, CA", 119.774425, 437),
new Flight("2016", "Boston, MA (Metropolitan Area)", "Richmond, VA", 136.3048831, 395),
new Flight("2016", "Boston, MA (Metropolitan Area)", "Buffalo, NY", 139.2092115, 474),
new Flight("2016", "Charlotte, NC", "St. Louis, MO", 275.0473414, 575),
new Flight("2016", "Charlotte, NC", "Detroit, MI", 328.1736089, 500),
new Flight("2016", "Charlotte, NC", "Tampa, FL (Metropolitan Area)", 269.3827727, 507),
new Flight("2016", "Charlotte, NC", "Memphis, TN", 261.5784123, 511),
new Flight("2016", "Chicago, IL", "Richmond, VA", 295.4702007, 607),
new Flight("2016", "Chicago, IL", "Cincinnati, OH", 267.2074027, 585),
new Flight("2016", "Chicago, IL", "Tulsa, OK", 270.4238455, 270),
new Flight("2016", "Chicago, IL", "Syracuse, NY", 270.42, 642),
new Flight("2016", "Cincinnati, OH", "Minneapolis/St. Paul, MN", 375.9145278, 334)};
return new ArrayList<>(Arrays.asList(temp));
}
private ArrayList<Flight> badInputArrayList(){
Flight[] temp = {
new Flight("2018","Asheville, NC","Miami, FL (Metropolitan Area)",119.6646127,677),
new Flight("2018","Asheville, NC","Tampa, FL (Metropolitan Area)",111.1095983,514),
new Flight("2018","Atlanta, GA (Metropolitan Area)","Cincinnati, OH",273.9105411,377),
new Flight("2018","Atlanta, GA (Metropolitan Area)","Memphis, TN",289.8798238,332),
new Flight("2018","Boise, ID","Seattle, WA",131.3517678,399),
new Flight("2018","Boise, ID","Spokane, WA",110.8682953,287),
new Flight("2018","Boise, ID","Sacramento, CA",129.1509692,437),
new Flight("2018","Boston, MA (Metropolitan Area)","Buffalo, NY",130.4956899,395),
new Flight("2018","Boston, MA (Metropolitan Area)","Richmond, VA",136.4161655,474),
new Flight("2018","Buffalo, NY","New York City, NY (Metropolitan Area)",136.4699697,292),
new Flight("2018","Charlotte, NC","St. Louis, MO",0.0,0),
new Flight("2018","Charlotte, NC","Detroit, MI",264.3863046,500),
new Flight("2018","Charlotte, NC","Tampa, FL (Metropolitan Area)",290.3426771,507),
new Flight("2018","Charlotte, NC","Memphis, TN",284.7862224,511),
new Flight("2018","Chicago, IL","Syracuse, NY",260.6205682,607),
new Flight("2018","Chicago, IL","Tulsa, OK",271.9742993,585),
new Flight("2018","Chicago, IL","Cincinnati, OH",133.352732,270),
new Flight("2018","Chicago, IL","Richmond, VA",262.2001325,642),
new Flight("2018","Cincinnati, OH","Minneapolis/St. Paul, MN",262.9060018,334),
new Flight("2017","Asheville, NC","Miami, FL (Metropolitan Area)",0,0),
new Flight("2017","Asheville, NC","Tampa, FL (Metropolitan Area)",124.4519219,514),
new Flight("2017","Atlanta, GA (Metropolitan Area)","Cincinnati, OH",313.655394,377),
new Flight("2017","Atlanta, GA (Metropolitan Area)","Memphis, TN",274.8223261,332),
new Flight("2017","Boise, ID","Seattle, WA",129.4190566,399),
new Flight("2017","Boise, ID","Spokane, WA",106.6399809,287),
new Flight("2017","Boise, ID","Sacramento, CA",129.9119902,437),
new Flight("2017","Boston, MA (Metropolitan Area)","Richmond, VA",132.355884,395),
new Flight("2017","Boston, MA (Metropolitan Area)","Buffalo, NY",132.4186695,474),
new Flight("2017","Buffalo, NY","New York City, NY (Metropolitan Area)",0,0),
new Flight("2017","Charlotte, NC","St. Louis, MO",273.6228611,575),
new Flight("2017","Charlotte, NC","Detroit, MI",262.8762495,500),
new Flight("2017","Charlotte, NC","Tampa, FL (Metropolitan Area)",276.6002795,507),
new Flight("2017","Charlotte, NC","Memphis, TN",0,0),
new Flight("2017","Chicago, IL","Richmond, VA",262.4844604,607),
new Flight("2017","Chicago, IL","Tulsa, OK",270.3571121,585),
new Flight("2017","Chicago, IL","Syracuse, NY",290.8316435,270),
new Flight("2017","Chicago, IL","Cincinnati, OH",124.3163743,642),
new Flight("2017","Cincinnati, OH","Minneapolis/St. Paul, MN",306.9397207,334),
new Flight("2016","Asheville, NC","Miami, FL (Metropolitan Area)",129.2055405,677),
new Flight("2016","Asheville, NC","Tampa, FL (Metropolitan Area)",126.5900629,514),
new Flight("2016","Atlanta, GA (Metropolitan Area)","Cincinnati, OH",298.0553139,377),
new Flight("2016","Atlanta, GA (Metropolitan Area)","Memphis, TN",306.4386275,332),
new Flight("2016","Boise, ID","Seattle, WA",128.5387179,399),
new Flight("2016","Boise, ID","Spokane, WA",114.2404508,287),
new Flight("2016","Boise, ID","Sacramento, CA",119.774425,437),
new Flight("2016","Boston, MA (Metropolitan Area)","Richmond, VA",136.3048831,395),
new Flight("2016","Boston, MA (Metropolitan Area)","Buffalo, NY",0,0),
new Flight("2016","Buffalo, NY","New York City, NY (Metropolitan Area)",138.6866248,292),
new Flight("2016","Charlotte, NC","St. Louis, MO",275.0473414,575),
new Flight("2016","Charlotte, NC","Detroit, MI",328.1736089,500),
new Flight("2016","Charlotte, NC","Tampa, FL (Metropolitan Area)",269.3827727,507),
new Flight("2016","Charlotte, NC","Memphis, TN",261.5784123,511),
new Flight("2016","Chicago, IL","Richmond, VA",295.4702007,607),
new Flight("2016","Chicago, IL","Cincinnati, OH",267.2074027,585),
new Flight("2016","Chicago, IL","Tulsa, OK",0,0),
new Flight("2016","Chicago, IL","Syracuse, NY",270.42,642),
new Flight("2016","Cincinnati, OH","Minneapolis/St. Paul, MN",375.9145278,334)
};
return new ArrayList<>(Arrays.asList(temp));
}
private ArrayList<Flight> badInputDataRemovedArrayList(){
Flight[] temp = {
new Flight("2018","Asheville, NC","Miami, FL (Metropolitan Area)",119.6646127,677),
new Flight("2018","Asheville, NC","Tampa, FL (Metropolitan Area)",111.1095983,514),
new Flight("2018","Atlanta, GA (Metropolitan Area)","Cincinnati, OH",273.9105411,377),
new Flight("2018","Boise, ID","Seattle, WA",131.3517678,399),
new Flight("2018","Boise, ID","Spokane, WA",110.8682953,287),
new Flight("2018","Boise, ID","Sacramento, CA",129.1509692,437),
new Flight("2018","Boston, MA (Metropolitan Area)","Richmond, VA",136.4161655,474),
new Flight("2018","Buffalo, NY","New York City, NY (Metropolitan Area)",136.4699697,292),
new Flight("2018","Charlotte, NC","St. Louis, MO",0.0,0),
new Flight("2018","Charlotte, NC","Detroit, MI",264.3863046,500),
new Flight("2018","Charlotte, NC","Tampa, FL (Metropolitan Area)",290.3426771,507),
new Flight("2018","Charlotte, NC","Memphis, TN",284.7862224,511),
new Flight("2018","Chicago, IL","Syracuse, NY",260.6205682,607),
new Flight("2018","Chicago, IL","Tulsa, OK",271.9742993,585),
new Flight("2018","Chicago, IL","Cincinnati, OH",133.352732,270),
new Flight("2018","Chicago, IL","Richmond, VA",262.2001325,642),
new Flight("2018","Cincinnati, OH","Minneapolis/St. Paul, MN",262.9060018,334),
new Flight("2017","Asheville, NC","Miami, FL (Metropolitan Area)",0,0),
new Flight("2017","Asheville, NC","Tampa, FL (Metropolitan Area)",124.4519219,514),
new Flight("2017","Atlanta, GA (Metropolitan Area)","Cincinnati, OH",313.655394,377),
new Flight("2017","Atlanta, GA (Metropolitan Area)","Memphis, TN",274.8223261,332),
new Flight("2017","Boise, ID","Seattle, WA",129.4190566,399),
new Flight("2017","Boise, ID","Spokane, WA",106.6399809,287),
new Flight("2017","Boise, ID","Sacramento, CA",129.9119902,437),
new Flight("2017","Boston, MA (Metropolitan Area)","Richmond, VA",132.355884,395),
new Flight("2017","Boston, MA (Metropolitan Area)","Buffalo, NY",132.4186695,474),
new Flight("2017","Buffalo, NY","New York City, NY (Metropolitan Area)",0,0),
new Flight("2017","Charlotte, NC","Detroit, MI",262.8762495,500),
new Flight("2017","Charlotte, NC","Tampa, FL (Metropolitan Area)",276.6002795,507),
new Flight("2017","Charlotte, NC","Memphis, TN",0,0),
new Flight("2017","Chicago, IL","Richmond, VA",262.4844604,607),
new Flight("2017","Chicago, IL","Tulsa, OK",270.3571121,585),
new Flight("2017","Chicago, IL","Syracuse, NY",290.8316435,270),
new Flight("2017","Chicago, IL","Cincinnati, OH",124.3163743,642),
new Flight("2016","Asheville, NC","Tampa, FL (Metropolitan Area)",126.5900629,514),
new Flight("2016","Atlanta, GA (Metropolitan Area)","Cincinnati, OH",298.0553139,377),
new Flight("2016","Atlanta, GA (Metropolitan Area)","Memphis, TN",306.4386275,332),
new Flight("2016","Boise, ID","Seattle, WA",128.5387179,399),
new Flight("2016","Boise, ID","Spokane, WA",114.2404508,287),
new Flight("2016","Boise, ID","Sacramento, CA",119.774425,437),
new Flight("2016","Boston, MA (Metropolitan Area)","Richmond, VA",136.3048831,395),
new Flight("2016","Boston, MA (Metropolitan Area)","Buffalo, NY",0,0),
new Flight("2016","Charlotte, NC","St. Louis, MO",275.0473414,575),
new Flight("2016","Charlotte, NC","Detroit, MI",328.1736089,500),
new Flight("2016","Charlotte, NC","Tampa, FL (Metropolitan Area)",269.3827727,507),
new Flight("2016","Charlotte, NC","Memphis, TN",261.5784123,511),
new Flight("2016","Chicago, IL","Richmond, VA",295.4702007,607),
new Flight("2016","Chicago, IL","Cincinnati, OH",267.2074027,585),
new Flight("2016","Chicago, IL","Tulsa, OK",0,0),
new Flight("2016","Chicago, IL","Syracuse, NY",270.42,642),
new Flight("2016","Cincinnati, OH","Minneapolis/St. Paul, MN",375.9145278,334)
};
return new ArrayList<>(Arrays.asList(temp));
}
}