Modifier and Type | Method and Description |
---|---|
int |
numOut()
Returns the number of copies of the video that are currently checked out.
|
int |
numOwned()
Returns the number of copies of the video that are in the inventory.
|
int |
numRentals()
Returns the total number of times this video has ever been checked out.
|
java.lang.String |
toString()
Return a string representation of the object in the following format:
"video [numOwned,numOut,numRentals]" . |
Video |
video()
Returns the video.
|
int numOwned()
Invariant: numOwned() > 0
.
int numOut()
Invariant: numOut() <= numOwned()
.
int numRentals()
Invariant: numRentals() >= numOut()
.
java.lang.String toString()
"video [numOwned,numOut,numRentals]"
.toString
in class java.lang.Object