public class Test {

    public static void main (String[] args) {

	// note: the following is a really bad way to build a list.
	// warning signs of badness: allocating two different kinds
	// of objects, accessing the instance variables of another class,
	// using the constant 3 to set the length

	// create an empty list
	List list = new List ();

	list.addNewFirstNode (3);
	list.addNewFirstNode (2);
	list.addNewFirstNode (1);

	list.print ();

	Node node = new Node (4, null);
	list.insertBefore (node, list.head);
	list.print ();

	List copy = list.copy ();
	copy.print ();

	List backwards = list.reverse ();
	backwards.print();

	Node newNode = new Node (5, null);
	list.appendNode (newNode);
	list.print();

	list.appendList (backwards);
	list.print();
    }
}
