Videoautomat

videoautomat
Class VideoCassette

java.lang.Object
  extended by StockItemImpl
      extended by videoautomat.VideoCassette

public class VideoCassette
extends StockItemImpl

This class implements a StockItem, representing a rented video, including the Date when it was rented


Constructor Summary
VideoCassette(String key)
          Constructs a new VideoCassette with the given name and the current time as renting time
 
Method Summary
 NumberValue getCost()
           
 int getDays()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VideoCassette

public VideoCassette(String key)
Constructs a new VideoCassette with the given name and the current time as renting time

Parameters:
key - the name of the video
Method Detail

getDays

public int getDays()
Returns:
the days this video is already rented, in the case of 0 days it returns 1.

getCost

public NumberValue getCost()
Returns:
the cost for this video from the day of renting to the current Date

Videoautomat