public class Rental
extends java.lang.Object
Domain:
movie : Movie -- the movie rented
numberOfDaysRented : integer -- the number of days the movie was rented
Invariant:
move ≠ null AND numberOfDaysRented ≥ 0
| Constructor and Description |
|---|
Rental(Movie movie,
int numberOfDaysRented)
The constructor for the Rental class.
|
| Modifier and Type | Method and Description |
|---|---|
float |
getAmountDue()
Gets the amount due for this movie based on the number of days it was rented.
|
int |
getFrequentRentalPoints()
Get the number frequent renter points for this movie based on the number of days it was rented.
|
java.lang.String |
getTitleOfMovie()
Returns the title of this rental's movie.
|
public Rental(Movie movie, int numberOfDaysRented)
movie - the movie rentednumberOfDaysRented - the number of days rentedpublic java.lang.String getTitleOfMovie()
public float getAmountDue()
public int getFrequentRentalPoints()