CSE 143
Miniquiz 14            Name:
12/04/2002                     Section:

Time: 6 minutes
 

 Draw the (informal) picture that results.  Be sure to label Front and Rear.  DO show v1 and v2 and the values they  reference.  If your picture is bit messy or hard to read, because you changed it as you went through the code, etc.: please, redraw it carefully, showing ONLY final the final state. (PS Don't worry about implementation, i.e., whether an array list or linked list or something else is used.  Make the picture abstract enough so that the implementation doesn't matter).

 Queue q = new Queue( );
 Object v1, v2;

  q.insert(“chore”);
  q.insert(“work”); 
  q.insert(“play”);
  v1 = q.remove();
  v2 = q.front();
  q.insert(“job”);
  q.insert(“fun”);