import java.util.ArrayList; public class CopyOfMovie { private String name; public ArrayList whereShowing() { ArrayList answer = new ArrayList(); // make the theater an input -- isAt // run isAt for every theater in ArrayList for(int i = 0; i < Theater.allTheaters.size(); ++i) { Theater t = Theater.allTheaters.get(i); if (this.isAt(t)) { answer.add(t); } } return answer; } public CopyOfMovie(String name) { this.name = name; } public void addTheater(Theater t) { t.addMovie(this); } public void removeTheater(Theater t) { t.removeMovie(this); } public boolean isAt(Theater t) { return t.isShowing(this); } public String toString() { return this.name; } public String getName() { return this.name; } }