-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAirport.java
More file actions
54 lines (40 loc) · 1023 Bytes
/
Airport.java
File metadata and controls
54 lines (40 loc) · 1023 Bytes
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
import java.util.ArrayList;
public class Airport {
private String name;
private String id;
private String city;
private String country;
public Airport(String name, String id, String city, String country) {
this.name=name;
this.id=id;
this.city=city;
this.country=country;
}
public String getName() {
return name;
}
public String getCity() {
return city;
}
public String getID() {
return id;
}
public String getCountry() {
return country;
}
public ArrayList<Flight> isDirectlyConnectedTo(Airport a2) {
return CentralRegistry.CheckDirect(this,a2);
}
public ArrayList<Airport> isInDirectlyConnectedTo(Airport a2) {
return CentralRegistry.CheckInDirect(this,a2);
}
public ArrayList<Airport> getCommonConnections(Airport a2){
return CentralRegistry.CheckCC(this,a2);
}
public void printCompanies() {
CentralRegistry.AssociatedCompanies(this);
}
public String toString() {
return city+", "+id;
}
}