import java.awt.Color; import canvas.CS101Canvas; //Name: //Lab Section: //Email: //CS101 Lab 6 //Lab6.java //Date: public class Lab6 { private static CS101Canvas screen = new CS101Canvas("Lists", Color.WHITE, 400,300); // for showing lists public static void main(String args[]) { ListItem a = new ListItem(1, new ListItem(2, new ListItem(3, null))); ListItem b = new ListItem(6, new ListItem(8, new ListItem(10, null))); ListItem c = new ListItem(7, null); screen.showData(a); screen.showData(b); screen.showData(c); System.out.println("a = " + a); System.out.println("b = " + b); System.out.println("c = " + c); try { Thread.sleep(5000); } catch (InterruptedException ie) {} c.next = b.next; try { Thread.sleep(5000); } catch (InterruptedException ie) {} a.number=0; b.next = c; System.out.println("b = " + b); } }