Methods Summary |
---|
public void | checkIn()checkIn
theEndTime = new Timestamp();
|
public int | getBaseRentalPeriodDays()
return theBaseRentalPeriodDays;
|
public Customer | getCustomer()
return theCustomer;
|
public Timestamp | getDueTime()
return theStartTime.addDays( theBaseRentalPeriodDays );
|
public Timestamp | getEndTime()
return theEndTime;
|
public Dollar | getRentalFee()
return theRentalFee;
|
public Timestamp | getStartTime()
return theStartTime;
|
public boolean | isLateReturn()isLateReturn
if ( theEndTime == null )
{
// Not yet returned, but they are asking about it anyway
Timestamp now = new Timestamp();
return now.differenceInDays( theStartTime ) >
theBaseRentalPeriodDays ;
}
else
{
// See if was late
return theEndTime.differenceInDays( theStartTime ) >
theBaseRentalPeriodDays;
}
|
public boolean | isOverdue()isOverdue
if ( theEndTime == null )
{
// Not yet returned
Timestamp now = new Timestamp();
return now.differenceInDays( theStartTime ) >
theBaseRentalPeriodDays ;
}
else
{
// Not overdue, since it has been returned
return false;
}
|
public void | setStartTime(Timestamp startTime)
theStartTime = startTime;
|