StandByApplet
Class StandByPassenger

java.lang.Object
  |
  +--StandByApplet.StandByPassenger

class StandByPassenger
extends Object
implements Comparable

A passenger waiting for a flight. You need to modify the compareTo() method so the proper order is maintained.


Field Summary
(package private)  Date checkInTime
           
(package private)  String clubID
           
(package private)  String frequentFlyerID
           
(package private)  String name
           
(package private)  String ticket
           
 
Constructor Summary
(package private) StandByPassenger(String ticket, String name, String frequentFlyerID, String clubID, Date checkInTime)
           
 
Method Summary
 int compareTo(Object o)
          Compares to another StandByPassenger.
 boolean equals(Object o)
          Overrides Object.equals so the natural ordering consistent with equals.
 int hashCode()
          Returns the hashcode for this StandByPassenger.
 String toString()
          Convert to a String to make displaying easy in a java.awt.List
 
Methods inherited from class java.lang.Object
, clone, finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

ticket

String ticket

name

String name

frequentFlyerID

String frequentFlyerID

clubID

String clubID

checkInTime

Date checkInTime
Constructor Detail

StandByPassenger

StandByPassenger(String ticket,
                 String name,
                 String frequentFlyerID,
                 String clubID,
                 Date checkInTime)
Method Detail

compareTo

public int compareTo(Object o)
Compares to another StandByPassenger. Ensure that the ordering has: Use checkInTime to compare within each class of passengers.

You need to modify this method.

Specified by:
compareTo in interface Comparable

toString

public String toString()
Convert to a String to make displaying easy in a java.awt.List
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides Object.equals so the natural ordering consistent with equals.
Overrides:
equals in class Object

hashCode

public int hashCode()
Returns the hashcode for this StandByPassenger.
Overrides:
hashCode in class Object