Class AbstractFlight

java.lang.Object
edu.pdx.cs410J.AbstractFlight
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Flight

public abstract class AbstractFlight extends Object implements Serializable
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 Details

  • Method Details

    • getNumber

      public abstract int getNumber()
      Returns a number that uniquely identifies this flight.
    • getSource

      public abstract String getSource()
      Returns the three-letter code of the airport at which this flight originates.
    • getDeparture

      Returns this flight's departure time as a Date.
    • getDepartureString

      public abstract String getDepartureString()
      Returns a textual representation of this flight's departure time.
    • getDestination

      public abstract String getDestination()
      Returns the three-letter code of the airport at which this flight terminates.
    • getArrival

      Returns this flight's arrival time as a Date.
    • getArrivalString

      public abstract String getArrivalString()
      Returns a textual representation of this flight's arrival time.
    • toString

      public final String toString()
      Returns a brief textual description of this flight.
      Overrides:
      toString in class Object