java.lang.ObjectPassengerSource
public class PassengerSource
Simulate passengers requesting rides from a taxi company. Passengers should be generated at random intervals.
| Constructor Summary | |
|---|---|
PassengerSource(TaxiCompany company)
Constructor for objects of class PassengerSource. |
|
| Method Summary | |
|---|---|
boolean |
requestPickup()
Have the source generate a new passenger and request a pickup from the company. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PassengerSource(TaxiCompany company)
company - The company to be used. Must not be null.
java.lang.NullPointerException - if company is null.| Method Detail |
|---|
public boolean requestPickup()