|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectevacuation.Evacuee
public class Evacuee
Objects of this class represent people fleeing a sinking ship.
| Constructor Summary | |
|---|---|
Evacuee(java.lang.String fname,
java.lang.String lname,
boolean male,
int age,
int income)
Constructs a newly allocated Evacuee with the specified information |
|
| Method Summary | |
|---|---|
int |
compareTo(Evacuee rhs)
Compares two Evacuees based on priority as described in Assignment2.doc |
java.lang.String |
toString()
Returns a String describing this evacuee in a format similar to the following Leonardo DiCaprio (Male, age 23, income $70) The String should not contain any line separators. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Evacuee(java.lang.String fname,
java.lang.String lname,
boolean male,
int age,
int income)
fname - The Evacuee's first namelname - The Evacuee's last namemale - A boolean value indicating whether or not the Evacuee is male or female
(true means male, false means female)age - The Evacuee's age in yearsincome - The Evacuee's annual income in US$| Method Detail |
|---|
public int compareTo(Evacuee rhs)
compareTo in interface java.lang.Comparable<Evacuee>rhs - The other Evacuee to be compared
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||