# Conflicts:
#	res/userdb.db
This commit is contained in:
Liam Beckett
2016-09-16 16:38:31 +12:00
25 changed files with 1077 additions and 182 deletions
@@ -9,7 +9,7 @@ import java.util.ArrayList;
* @author Fan-Wu Yang
*
*/
public class Airline {
public class Airline{
private int ID;
private String IATA;
private String ICAO;
@@ -254,6 +254,31 @@ public class Airport {
return country;
}
//JavaDoc needed
public Double getTimezone() {
if (this.city != null) {
return this.city.getTimezone();
}else{
return 0.0;
}
}
//JavaDoc needed
public String getDST() {
if (this.country != null) {
return this.country.getDST();
}else{
return "";
}
}
//JavaDoc needed
public String getTz() {
if (this.city != null) {
return this.city.getTimeOlson();
}else{
return "";
}
}
/**
* set country class associated with this airport
* @param country
@@ -18,6 +18,8 @@ public class FlightPoint {
public FlightPoint(String type, String name, double altitude, double latitude, double longitude){
//extra calculations will have to be used to find heading, legdistance and total distance. If necessary
//Type 1 file the file the lecturers gave us
//indexID = flight path ID
//ID = unique Auto Increment value
this.name = name;
this.ID = -1;
this.indexID = -1;
@@ -120,6 +120,31 @@ public class Route {
return ID;
}
}
//JavaDoc needed
public int getAirlineID() throws DataException {
if (this.airline != null) {
return this.getAirline().getID();
}else {
return 0;
}
}
public int getSourceID() throws DataException {
if (this.getSourceAirport() != null) {
return this.getSourceAirport().getID();
} else {
return 0;
}
}
public int getDestID() throws DataException {
if (this.getDestinationAirport() != null) {
return this.getDestinationAirport().getID();
} else {
return 0;
}
}
/**
* returns the number of stops the route stops.
* @return