support.Flight
Class FlightSpecs
java.lang.Object
|
+--support.Flight.FlightSpecs
- public class FlightSpecs
- extends java.lang.Object
Data bucket that holds information about a flight.
- Author:
- Benoit Hudson (bh), Mark Handy (mdh)
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
airline
public java.lang.String airline()
- Returns:
- the airline (PA, UA, AC, etc)
flightNumber
public int flightNumber()
- Returns:
- the flight number (TW 800 yields 800, AC8813 yields 8813, etc)
originCode
public java.lang.String originCode()
- Returns:
- the 3-letter code of the airport the flight left (PVD, LAX, etc)
- See Also:
AirportSpecs.code()
destinationCode
public java.lang.String destinationCode()
- Returns:
- the 3-letter code of the airport the flight goes to (PVD, etc)
- See Also:
AirportSpecs.code()
departureTime
public int departureTime()
- Returns:
- the departure time of the flight, in GMT minutes since midnight
arrivalTime
public int arrivalTime()
- Returns:
- the arrival time of the flight, in GMT minutes since midnight
planeType
public java.lang.String planeType()
- Returns:
- the airliner type (737, DC8, Wright Brothers, etc)
fareCodes
public java.lang.String fareCodes()
- Returns:
- the fares available (Y, Q, H, F, P, etc; dunno what they mean)
toString
public java.lang.String toString()
- Gives a string in a form useful for debugging. (If you have a FlightSpecs f,
you can just
System.err.println(f).)
- Returns:
- String representing the flight
- Overrides:
- toString in class java.lang.Object
ticketString
public java.lang.String ticketString()
- Gives a string in a form useful for printing out itineraries.
Note the times are given in local time of the airport, so
a flight
AC8813 YHZ 1200N BOS 1235P DH8 Y Q H P F
Leaves YHZ at noon Atlantic time and arrives in Boston at 12:35 Eastern
time. So it takes 1:35, not 35 minutes.
- Returns:
- String that should be printed on console to show itinerary