parent
f79dd9e463
commit
09675d9d3f
@ -1,5 +1,71 @@
|
||||
package seng202.group9.Core;
|
||||
|
||||
public class Airport {
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class Airport {
|
||||
private int ID;
|
||||
private String ICAO;
|
||||
private String IATA_FFA;
|
||||
private float altitude;
|
||||
private float longitude;
|
||||
private float latitude;
|
||||
private City location;
|
||||
private ArrayList<Route> departureRoutes = new ArrayList<Route>();
|
||||
private ArrayList<Route> arrivalRoutes = new ArrayList<Route>();
|
||||
|
||||
public Airport(int ID, String ICAO, String IATA_FFA, float altitude, float longitude,
|
||||
float latitude, City location){
|
||||
this.ID = ID;
|
||||
this.ICAO = ICAO;
|
||||
this.IATA_FFA = IATA_FFA;
|
||||
this.altitude = altitude;
|
||||
this.longitude = longitude;
|
||||
this.latitude = latitude;
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
public int getID(){
|
||||
return ID;
|
||||
}
|
||||
|
||||
public String getICAO(){
|
||||
return ICAO;
|
||||
}
|
||||
|
||||
public String IATA_FFA(){
|
||||
return IATA_FFA;
|
||||
}
|
||||
|
||||
public float getAltitude(){
|
||||
return altitude;
|
||||
}
|
||||
|
||||
public float getLongitude(){
|
||||
return longitude;
|
||||
}
|
||||
|
||||
public float getLatitude(){
|
||||
return latitude;
|
||||
}
|
||||
|
||||
public City getLocation(){
|
||||
return location;
|
||||
}
|
||||
|
||||
public ArrayList<Route> getDepartureRoutes(){
|
||||
return departureRoutes;
|
||||
}
|
||||
|
||||
public ArrayList<Route> getArrivalRoutes(){
|
||||
return arrivalRoutes;
|
||||
}
|
||||
|
||||
public void addDepartureRoutes(Route route){
|
||||
departureRoutes.add(route);
|
||||
}
|
||||
|
||||
public void addArrivalRoutes(Route route){
|
||||
arrivalRoutes.add(route);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,5 +1,37 @@
|
||||
package seng202.group9.Core;
|
||||
|
||||
public class City {
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class City {
|
||||
private String name;
|
||||
private String timezone;
|
||||
private String timeOlson;
|
||||
private ArrayList<Airport> airports;
|
||||
|
||||
public City(String name, String timezone, String timeOlson){
|
||||
this.name = name;
|
||||
this.timezone = timezone;
|
||||
this.timeOlson = timeOlson;
|
||||
this.airports = new ArrayList<Airport>();
|
||||
}
|
||||
|
||||
public String getName(){
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getTimezone(){
|
||||
return timezone;
|
||||
}
|
||||
|
||||
public String getTimeOlson(){
|
||||
return timeOlson;
|
||||
}
|
||||
|
||||
public ArrayList<Airport> getAirports(){
|
||||
return airports;
|
||||
}
|
||||
|
||||
public void addAirport(Airport airport){
|
||||
airports.add(airport);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,37 @@
|
||||
package seng202.group9.Core;
|
||||
|
||||
public class FlightPath {
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class FlightPath {
|
||||
private int ID;
|
||||
private ArrayList<FlightPoint> flightPoints;
|
||||
private Airport departureAirport;
|
||||
private Airport arrivalAirport;
|
||||
|
||||
public FlightPath(int ID, Airport departureAirport, Airport arrivalAirport){
|
||||
this.ID = ID;
|
||||
this.departureAirport = departureAirport;
|
||||
this.arrivalAirport = arrivalAirport;
|
||||
this.flightPoints = new ArrayList<FlightPoint>();
|
||||
}
|
||||
|
||||
public int getID(){
|
||||
return ID;
|
||||
}
|
||||
|
||||
public Airport departsFrom(){
|
||||
return departureAirport;
|
||||
}
|
||||
|
||||
public Airport arrivesAt(){
|
||||
return arrivalAirport;
|
||||
}
|
||||
|
||||
public ArrayList<FlightPoint> getFlight(){
|
||||
return flightPoints;
|
||||
}
|
||||
|
||||
public void addFlightPoint(FlightPoint flightPoint){
|
||||
flightPoints.add(flightPoint);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,76 @@
|
||||
package seng202.group9.Core;
|
||||
|
||||
public class FlightPoint {
|
||||
|
||||
private String name;
|
||||
private int ID;
|
||||
private int indexID;
|
||||
private String type;
|
||||
private String via;
|
||||
private String heading;
|
||||
private float altitude;//note float has a max value so they may try to break this
|
||||
private float legDistance;
|
||||
private float totalDistance;
|
||||
private float latitude;
|
||||
private float longitude;
|
||||
|
||||
public FlightPoint(String name, int ID, int indexID, String type, String via,
|
||||
String heading, float altitude, float legDistance, float totalDistance,
|
||||
float latitude, float longitude){
|
||||
this.name = name;
|
||||
this.ID = ID;
|
||||
this.indexID = indexID;
|
||||
this.type = type;
|
||||
this.via = via;
|
||||
this.heading = heading;
|
||||
this.altitude = altitude;
|
||||
this.legDistance = legDistance;
|
||||
this.totalDistance = totalDistance;
|
||||
this.latitude = latitude;
|
||||
this.longitude = longitude;
|
||||
}
|
||||
|
||||
public String getName(){
|
||||
return name;
|
||||
}
|
||||
|
||||
public int getID(){
|
||||
return ID;
|
||||
}
|
||||
|
||||
public int getIndex(){
|
||||
return indexID;
|
||||
}
|
||||
|
||||
public String getType(){
|
||||
return type;
|
||||
}
|
||||
|
||||
public String getVia(){
|
||||
return via;
|
||||
}
|
||||
|
||||
public String getHeading(){
|
||||
return heading;
|
||||
}
|
||||
|
||||
public float getAltitude(){
|
||||
return altitude;
|
||||
}
|
||||
|
||||
public float getLegDistance(){
|
||||
return legDistance;
|
||||
}
|
||||
|
||||
public float getTotalDistance(){
|
||||
return totalDistance;
|
||||
}
|
||||
|
||||
public float getLongitude(){
|
||||
return longitude;
|
||||
}
|
||||
|
||||
public float getLatitude(){
|
||||
return latitude;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,5 +1,52 @@
|
||||
package seng202.group9.Core;
|
||||
|
||||
public class Route {
|
||||
|
||||
private int ID;
|
||||
private int stops;
|
||||
private String codeShare;
|
||||
private String equipment;
|
||||
private Airline airline;
|
||||
private Airport departureAirport;
|
||||
private Airport arrivalAirport;
|
||||
|
||||
public Route(int ID, int stops, String codeShare, String equipment, Airline airline,
|
||||
Airport departureAirport, Airport arrivalAirport){
|
||||
this.ID = ID;
|
||||
this.stops = stops;
|
||||
this.codeShare = codeShare;
|
||||
this.equipment = equipment;
|
||||
this.airline = airline;
|
||||
this.departureAirport = departureAirport;
|
||||
this.arrivalAirport = arrivalAirport;
|
||||
}
|
||||
|
||||
public int getID(){
|
||||
return ID;
|
||||
}
|
||||
|
||||
public int getStops(){
|
||||
return stops;
|
||||
}
|
||||
|
||||
public String getCode(){
|
||||
return codeShare;
|
||||
}
|
||||
|
||||
public String getEquipment(){
|
||||
return equipment;
|
||||
}
|
||||
|
||||
public Airline getAirline(){
|
||||
return airline;
|
||||
}
|
||||
|
||||
public Airport departsFrom(){
|
||||
return departureAirport;
|
||||
}
|
||||
|
||||
public Airport arrivesAt(){
|
||||
return arrivalAirport;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in new issue