import java.io.*;
class Link
   {
   public Record data;            // data item is of type Record;
				  // the Link class does not really
				  // care what Record is
   public Link next;              // next link in list
// -------------------------------------------------------------
   public Link(Record newData) 	// constructor that builds a Link
				// object, given a Record
      {
	data = new Record(newData);
	next = null;
      }
// -------------------------------------------------------------
   public void displayLink()      // prints the contents of the
				  // Record
      {
	data.print();
      }
// -------------------------------------------------------------
   public void displayLink(PrintStream p)      // prints the contents
						// of the Record to the PrintStream
      {
	data.print(p);
      }
   }  // end class Link
