/**
 * Movie: a class to model a movie in a NetFlix-type movie-rental
 * system.
 *
 * @author CS117 3a (Carleton College, Winter 2006)
 * @version 0.99 (designed in class 10 February 2006).
 */

class Movie {
    private String title;      // movie title
    private Subscriber renter; // current subscriber, null if none.
    private boolean available; // true if the movie isn't currently rented.

    // Constructs a new movie with a given title.
    public Movie(String title) {
	this.title = title;
	available = true;
    }

    // Accessor for the title.
    public String getTitle() {
	return title;
    }

    // Accessor for the movie's availability.
    public boolean isAvailable() {
	return available;
    }

    // Mutators for the movie's renter.  Sets the renter and
    // available=false to rent, or unsets the renter and sets available=true..
    public void setRenter(Subscriber renter) {
	this.renter = renter;
	available = false;
    }

    public void unsetRenter() {
	this.renter = null;
	available = true;
    }

}
