-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
83 lines (73 loc) · 2.77 KB
/
Copy pathMain.java
File metadata and controls
83 lines (73 loc) · 2.77 KB
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
package ICP_PROJECT;
import java.util.ArrayList;
public class Main {
/**
* arraylist that has airport,airline,route objects
*/
public static ArrayList<Airports> airportObjects = new ArrayList<>();
public static ArrayList<Airlines> airlineObjects = new ArrayList<>();
public static ArrayList<Routes> routeObjects = new ArrayList<>();
public static void main(String[] args){
/**
* looping through array from file reading
* and appending to airportsObject
* @param fileName
*/
ArrayList<String []> Airports_fileArray = new ArrayList<>(ReadFile.ReadFile("src/airports.csv"));
for (String[] array: Airports_fileArray){
Airports airportsObject = Objects.airportObjects(array);
airportObjects.add(airportsObject);
}
/**
* looping through array from file reading
* and appending to arlineObjects
* @param fileName
*/
// ArrayList<String[]> Airlines_FileArray = new ArrayList<>(ReadFile.ReadFile("src/airlines.csv"));
// for (String [] array: Airlines_FileArray){
// Airlines airlineObject = Objects.airlineObject(array);
// airlineObjects.add(airlineObject);
// }
// /**
// * looping through array from file reading
// * and appending to routeObjects
// * @param fileName
// */
// ArrayList<String[]> Routes_fileArray = new ArrayList<>(ReadFile.ReadFile("src/routes.csv"));
// for (String[] array: Routes_fileArray){
// Routes routesObject = Objects.routesObject(array);
// routeObjects.add(routesObject);
// }
// Testing for execution
// System.out.println(airportObjects);
// System.out.println(airlineObjects);
// System.out.println(routeObjects);
// Objects.fileReading();
//
//
/**
* Testing
*
*/
// System.out.println(Objects.getairportId("Accra","Ghana"));
//
// Scanner input = new Scanner(System.in);
// System.out.println("City Name:");
// String City = input.nextLine();
// System.out.println("Country Name:");
// String Country = input.nextLine();
// System.out.println("Airport ID for" + City+","+Country+" is: ");
// System.out.println(Objects.getairportId(City,Country));
// System.out.println();
//
/**
*
* Getting the Airport object after parsing ID
*/
//
// System.out.println(Objects.getAirportID(248));
//
Routes.populateHashmap();
System.out.println(Search.UniformCostSearch("ACC","BSK"));
}
}