1. Simplest program that keeps time. 

(a) write your name(s)
(b) write team number
(c) contribute a little at a time (a letter, a word)
(d) pass it around until it's over

Conclusions: to keep time you need a javax.swing.Timer object. You 
need to create it and start it. When you create it you need to give 
it a rate (in milliseconds) and an actionlistener (i.e., an instance 
of a class that implements ActionListener, an interface defined in 
the java.awt.event package). Such an object will have (from its class
definition, in the blueprint, an actionPerformed method defined, that
has one argument, an ActionEvent (also defined java.awt.event). 

2. Simplest program that detects and reports mouse motion events. 

Q: besides motion events do we have any other kind(s) of mouse events?

This time indicate if you were in lab this week. 

If you want to detect events you need to have a source of events. 
You also need to have a listener. The listener needs to be registered.
In this case the interface of interest is MouseMotionListener. It says
you need to provide two methods (mouseMoved and mouseDragged). Each one
of these methods has one argument of type MouseEvent. 

import javax.swing.*;
import java.awt.event.*; 

public class One implements MouseMotionListener {
  int counter; 
  public void mouseMoved(MouseEvent e) { 
    System.out.println("mouse moved... " + counter++); 
  }
  public void mouseDragged(MouseEvent e) { 
    int x = e.getX(), y = e.getY(); 
    System.out.println( x + ", " + y ); 
  }
  public static void main(String[] args) {
    JFrame a = new JFrame(); 
    a.setVisible(true);
    a.setSize(400, 400); 
    a.addMouseMotionListener(new One()); 
  }
}

import javax.swing.*;
import java.awt.event.*; 

public class One extends JFrame implements MouseMotionListener {
  public One() {
    this.setVisible(true); 
    this.setSize(400, 400); 
  }
  int counter; 
  public void mouseMoved(MouseEvent e) { 
    System.out.println("mouse moved... " + counter++); 
  }
  public void mouseDragged(MouseEvent e) { 
    int x = e.getX(), y = e.getY(); 
    System.out.println( "(" + x + ", " + y + ")" ); 
  }
  public static void main(String[] args) {
    One a = new One(); // when I create the JFrame that also is the listener
    a.addMouseMotionListener(a); 
  }
}

3. Sorting Comparable objects with Collections.sort

Welcome to DrJava.  Working directory is C:\Users\dgerman\Desktop
> run Player
[Chip:30, Yiwen:19, Kelley:22, Harrison:25, Austin:28, Vicki:20]
[Chip:30, Yiwen:19, Kelley:22, Harrison:25, Austin:28, Vicki:20]


Players with 21 points or less should come first in descending order. 
Then the players with 22 or more points should come asending order.

import java.util.*; 

class Player implements Comparable<Player>  {
  public int compareTo(Player other) {
    if (this.points <= 21 && other.points > 21) return -1; 
    else if (this.points > 21 && other.points <= 21) return 1; 
    else if (this.points > 21 && other.points > 21) return this.points - other.points; 
    else  return - (this.points - other.points);     
  }
  String name;
  int points;
  Player(String n, int p) {
    this.name = n; 
    this.points = p;
  }
  public String toString() {
    return this.name + ":" + this.points; 
  }
  public static void main(String[] args) {
    ArrayList<Player> a = new ArrayList<Player>(); 
    a.add(new Player("Chip"    , 30));
    a.add(new Player("Yiwen"   , 19)); 
    a.add(new Player("Kelley"  , 22)); 
    a.add(new Player("Harrison", 25)); 
    a.add(new Player("Austin"  , 28)); 
    a.add(new Player("Vicki"   , 20)); 
    System.out.println( a ); 
    Collections.sort( a ); 
    System.out.println( a ); 
  }
}

This runs as follows: 

Welcome to DrJava.  Working directory is C:\Users\dgerman\Desktop
> run Player
[Chip:30, Yiwen:19, Kelley:22, Harrison:25, Austin:28, Vicki:20]
[Vicki:20, Yiwen:19, Kelley:22, Harrison:25, Austin:28, Chip:30]



Next time you will need to bring one such paper completed at home. 

I'll email you what paper. 

--