toString method
<p>I want to add a <code>toString</code> method in the <code>Item</code> class that returns the title of the item in there. </p>

<p>I have need make sure that the toString method in the <code>DVD</code> class calls the <code>toString</code> method in <code>Item</code> so that it can return a string that contains both the title and the director. </p>

<p><code>Item</code> is the superclass and <code>DVD</code> is the subclass.</p>

<pre><code>  public class Item
   {
  private String title;
  private int playingTime;
  private boolean gotIt;
  private String comment;

public Item(String theTitle, int time)
{
    title = theTitle;
    playingTime = time;
    gotIt = false;
    comment = "&lt;no comment&gt;";
}

// Getters and setters omitted

public void print()
{
    System.out.print(title + " (" + playingTime + " mins)");
    if(gotIt) {
        System.out.println("*");
    } else {
        System.out.println();
    }
    System.out.println("    " + comment);
}
</code></pre>

<p>}</p>

<pre><code> public class DVD extends Item 
 {
 private String director;

public DVD(String theTitle, String theDirector, int time)
{
    super(theTitle, time);
    director = theDirector;
}

// Getters and setters omitted

public void print()
{
    System.out.println("    director: " + director);
}
</code></pre>

<p>}</p>
