edu.pdx.cs399J
Class AbstractFlight

java.lang.Object
  extended by edu.pdx.cs399J.AbstractFlight

public abstract class AbstractFlight
extends Object

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.


Constructor Summary
AbstractFlight()
           
 
Method Summary
 Date getArrival()
          Returns this flight's arrival time as a Date.
abstract  String getArrivalString()
          Returns a textual representation of this flight's arrival time.
 Date getDeparture()
          Returns this flight's departure time as a Date.
abstract  String getDepartureString()
          Returns a textual representation of this flight's departure time.
abstract  String getDestination()
          Returns the three-letter code of the airport at which this flight terminates.
abstract  int getNumber()
          Returns a number that uniquely identifies this flight.
abstract  String getSource()
          Returns the three-letter code of the airport at which this flight originates.
 String toString()
          Returns a brief textual description of this flight.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractFlight

public AbstractFlight()
Method Detail

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

public Date 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

public Date 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 String toString()
Returns a brief textual description of this flight.

Overrides:
toString in class Object


Copyright © 2000-2009 Portland State University. All Rights Reserved.