Package edu.pdx.cs410J
Class AbstractFlight
java.lang.Object
edu.pdx.cs410J.AbstractFlight
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Flight
This class represents an airline flight. Each flight has a unique
number identifying it, an origin airport identified by the
airport's three-letter code, a departure time, a destination
airport identified by the airport's three-letter code, and an
arrival time.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns this flight's arrival time as aDate
.abstract String
Returns a textual representation of this flight's arrival time.Returns this flight's departure time as aDate
.abstract String
Returns a textual representation of this flight's departure time.abstract String
Returns the three-letter code of the airport at which this flight terminates.abstract int
Returns a number that uniquely identifies this flight.abstract String
Returns the three-letter code of the airport at which this flight originates.final String
toString()
Returns a brief textual description of this flight.
-
Constructor Details
-
AbstractFlight
public AbstractFlight()
-
-
Method Details
-
getNumber
Returns a number that uniquely identifies this flight. -
getSource
Returns the three-letter code of the airport at which this flight originates. -
getDeparture
Returns this flight's departure time as aDate
. -
getDepartureString
Returns a textual representation of this flight's departure time. -
getDestination
Returns the three-letter code of the airport at which this flight terminates. -
getArrival
Returns this flight's arrival time as aDate
. -
getArrivalString
Returns a textual representation of this flight's arrival time. -
toString
Returns a brief textual description of this flight.
-