
public class Movie {
    private int id;
    private static int count = 0;
    private String title;
    private int duration; // in minutes
    private Date releaseDate;
    private Genre genre;
    
    public Movie(String theTitle, int theDuration, Date theReleaseDate, Genre theGenre) {
        id = count;
        count++;
        title = theTitle;
        duration = theDuration;
        releaseDate = theReleaseDate;
        genre = theGenre;
    }
    
    public int getId() {
        return id;
    }
    public String getTitle() {
        return title;
    }
    public int getDuration() {
        return duration;
    }
    public Date getReleaseDate() {
        return releaseDate;
    }
    public Genre getGenre() {
        return genre;
    }
    
    // Format: Name (Erscheinungsjahr, Genre, Spieldauer)
    // Beispiel: Der Grinch (2018, Comedy, 89 min)
    public String toString() {
        return title + " (" + Integer.toString(releaseDate.getYear()) + ", " 
               + genre.toString() + ", " + Integer.toString(duration) + " min)";
    }
    
}
