edu.lmu.liftor
Class Traveller.RandomFloorTraveller

java.lang.Object
  |
  +--edu.lmu.liftor.Traveller
        |
        +--edu.lmu.liftor.Traveller.FloorTraveller
              |
              +--edu.lmu.liftor.Traveller.RandomFloorTraveller
All Implemented Interfaces:
Person.Personality
Enclosing class:
Traveller

public static class Traveller.RandomFloorTraveller
extends Traveller.FloorTraveller

A random floor traveller moves randomly amongst floors.


Nested Class Summary
 
Nested classes inherited from class edu.lmu.liftor.Traveller
Traveller.FloorTraveller, Traveller.RandomFloorTraveller, Traveller.VagrantTraveller
 
Field Summary
 
Fields inherited from class edu.lmu.liftor.Traveller.FloorTraveller
destination
 
Fields inherited from class edu.lmu.liftor.Traveller
journeyStart, travelReports, travelTime, VAGRANT
 
Constructor Summary
Traveller.RandomFloorTraveller(int delay)
           
 
Method Summary
 int doFloor(Person p)
          This Traveller's action is to simply hang about Slacker style.
 boolean leaveFloor(Person p)
          After an average of two minutes, leave this floor.
 Floor pickFloor(Person p)
          This method must return the floor that this traveller wants to go to.
 
Methods inherited from class edu.lmu.liftor.Traveller.FloorTraveller
getName, motivate
 
Methods inherited from class edu.lmu.liftor.Traveller
beginJourney, endJourney, getLastJourneyTime, inTransit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Traveller.RandomFloorTraveller

public Traveller.RandomFloorTraveller(int delay)
Method Detail

doFloor

public int doFloor(Person p)
This Traveller's action is to simply hang about Slacker style.

Specified by:
doFloor in class Traveller.FloorTraveller

leaveFloor

public boolean leaveFloor(Person p)
After an average of two minutes, leave this floor.

Overrides:
leaveFloor in class Traveller.FloorTraveller

pickFloor

public Floor pickFloor(Person p)
Description copied from class: Traveller.FloorTraveller
This method must return the floor that this traveller wants to go to. It is free to take as long as it wants, but it has to eventually give a valid floor to travel to.

Specified by:
pickFloor in class Traveller.FloorTraveller