FileDocCategorySizeDatePackage
RentalItem.javaAPI DocExample641Thu Dec 26 11:01:36 GMT 2002com.mediamania.store

RentalItem.java

package com.mediamania.store;

public class RentalItem
{
    private MediaItem       mediaItem;
    private String          serialNumber;
    private Rental          currentRental;
    
    private RentalItem()
    { }
    public RentalItem(MediaItem item, String serialNum) {
        mediaItem = item;
        item.addRentalItem(this);
        serialNumber = serialNum;
        currentRental = null;
    }
    public MediaItem getMediaItem() {
        return mediaItem;
    }
    public Rental getCurrentRental() {
        return currentRental;
    }
    public void setCurrentRental(Rental rental) {
        currentRental = rental;
    }
}