import java.util.*; /** Representation of a Journal in the library circulation system */ public class Journal extends CirculationItem { // additional instance variables private ArrayList articles; // list of articles in this Journal /** Construct a Journal with the given title, call number, and an empty list of articles */ public Journal(String title, String callNumber) { super(title, callNumber); articles = new ArrayList(); } /** Set the list of articles to the given list */ public void setArticles(ArrayList list) { articles = list; } /** Get the list of articles in this Journal */ public ArrayList getArticles() { return articles; } /** Return a representation of this Journal as a string */ public String toString() { return "Journal(title=" + getTitle() + ", call number=" + getCallNumber() + ", checked out=" + !inLibrary() + ", articles=" + articles + ")"; } }