// Jim Herrero import java.util.*; public class Movie implements Comparable { private int year; private String title; private Person director; private LinkedList actors; public Movie(int y, String t, Person d, LinkedList a) { year = y; title = t; director = d; actors = new LinkedList(); for(Person actor : a) actors.add(actor); } public int compareTo(Movie other) { //return title.compareTo(other.title); return director.compareTo(other.director); } public String toString() { String actorstring = ""; for(Person actor : actors) actorstring += actor + ", "; actorstring = actorstring.substring(0, actorstring.length() - 3); return year + " " + title + " " + actorstring + " Dir: " + director; } public LinkedList getActors() { return actors; } }