taxisrus.implementation
Class Cab

java.lang.Object
  |
  +--taxisrus.implementation.Cab
All Implemented Interfaces:
Serializable

public class Cab
extends Object
implements Serializable

Cab object

Author:
MIKAM Last Update $Date$ Please contact author for change/iquiry requests.
See Also:
Serialized Form

Field Summary
protected  int _cabID
           
protected  Customer _customer
           
protected  Driver _driver
           
protected  int _priority
           
protected  int _zoneID
           
 
Constructor Summary
Cab()
          Constructor
Cab(int cab_id, int driver_id)
          Constructor
Cab(int id, int priority, int zone, Driver driver)
          Constructor
 
Method Summary
 int getCabID()
          returns the id number of the cab
 Customer getCustomer()
          get the customer
 Driver getDriver()
          get Driver
 int getDriverID()
          get Driver ID
 int getPriority()
          returns the priority of the cab
 int getZoneID()
          get zone
 void setCustomer(Customer customer)
          set the customer
 boolean setDriver(Driver driver)
          set Driver
 void setPriority(int priority)
          set the priority when you want to push the cab to the end of the list
 void setZone(int zone)
          set zone
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_priority

protected int _priority

_cabID

protected int _cabID

_zoneID

protected int _zoneID

_driver

protected Driver _driver

_customer

protected Customer _customer
Constructor Detail

Cab

public Cab()
Constructor

Cab

public Cab(int cab_id,
           int driver_id)
Constructor
Parameters:
cab_id -  
driver_id -  

Cab

public Cab(int id,
           int priority,
           int zone,
           Driver driver)
Constructor
Parameters:
id - is the cabID which identifies the cab
Method Detail

getCabID

public int getCabID()
returns the id number of the cab
Returns:
returns the cabID

getPriority

public int getPriority()
returns the priority of the cab
Returns:
returns the priority of the cab

setPriority

public void setPriority(int priority)
set the priority when you want to push the cab to the end of the list
Parameters:
new - priority for the cab

setCustomer

public void setCustomer(Customer customer)
set the customer
Parameters:
customer - object
Returns:
true of customer is not null

getCustomer

public Customer getCustomer()
get the customer
Returns:
customer of this cab

getZoneID

public int getZoneID()
get zone
Returns:
current zone of cab

setZone

public void setZone(int zone)
set zone
Parameters:
zone - #

getDriver

public Driver getDriver()
get Driver

getDriverID

public int getDriverID()
get Driver ID

setDriver

public boolean setDriver(Driver driver)
set Driver


API documentation for build 958