fr.jussieu.gla.wasa.samples.party
Class Boat

java.lang.Object
  |
  +--fr.jussieu.gla.wasa.samples.party.Boat
Direct Known Subclasses:
Fleet.MyBoat

public class Boat
extends java.lang.Object

Component of the Progressive Party problem representing a boat.

Version:
$Revision: 1.2 $ $Date: 2002/04/17 15:24:08 $
Author:
Florent Selva, Laurent Caillette

Field Summary
protected  int capacity
           
protected  int crew
           
protected  boolean host
           
protected  int rank
           
 
Constructor Summary
Boat()
           
 
Method Summary
 int getCapacity()
          Returns the capacity of the boat, with the crew.
 int getCrew()
          Returns the crew number.
 int getRank()
          Returns the boat rank.
 int getSpareCapacity()
          Returns the real capacity of the boat, without the crew.
 boolean isHost()
          Returns true if the boat is an host boat.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

rank

protected int rank

crew

protected int crew

capacity

protected int capacity

host

protected boolean host
Constructor Detail

Boat

public Boat()
Method Detail

getCrew

public int getCrew()
Returns the crew number.
Returns:
The crew number.

isHost

public boolean isHost()
Returns true if the boat is an host boat.
Returns:
True if the boat is an host boat

getSpareCapacity

public int getSpareCapacity()
Returns the real capacity of the boat, without the crew.
Returns:
The real capacity of the boat, without the crew

getCapacity

public int getCapacity()
Returns the capacity of the boat, with the crew.
Returns:
The capacity of the boat, with the crew

getRank

public int getRank()
Returns the boat rank.
Returns:
The boat rank.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object