//Zachary Fitzsimmons
import java.util.*;
import java.io.*;
public class Movie
implements Comparable<Movie>
{
private Integer year;
private String title;
private Person director;
private LinkedList<Person> actors;
public Movie()
{
year = 0;
title = "";
director = new Person();
actors = new LinkedList<Person>();
}
public Movie(int y, String t, Person d, LinkedList<Person> a)
{
year = y;
title = t;
director = d;
actors = new LinkedList<Person>();
for(Person p : a)
actors.add(p);
}
public LinkedList<Person> getActors()
{
return actors;
}
public int compareTo(Movie m2)
{
return title.compareTo(m2.title);
}
public String toString()
{
String actor_string = "";
for(Person actor : actors)
actor_string += actor + " ";
return new String(year + " " + title + " Director: " + director + " Actors: " + actor_string);
}
}