import java.util.*;
public class DVDCollection {
    private ArrayList<DVD>   dvds;

	public DVDCollection() { dvds = new ArrayList<DVD>(); }

	public ArrayList<DVD> getDvds() { return dvds; }
	public String toString() { return ("DVD Collection of size " + dvds.size()); }

	public void add(DVD aDvd) { dvds.add(aDvd); }
	public boolean remove(String title) {
		for (DVD aDVD: dvds) {
			if (aDVD.getTitle().equals(title)) {
				dvds.remove(aDVD);
				return true;
			}
		}
		return false;
	}
	public static void main (String[] args) {
         DVDCollection c = new DVDCollection();
         c.add(new DVD("Star Wars", 1978, 124));
         c.add(new DVD("Java is cool", 2002, 93));
         c.add(new DVD("Mary Poppins", 1968, 126));
         c.add(new DVD("The Green Mile", 1999, 148));
         c.remove("Mary Poppins");
         for (DVD aDVD: c.getDvds()) 
			System.out.println(aDVD);
	}
}