public class TempWorker {
    private String name;
    private int wordsPerMinute;
    private boolean isExperienced;
    
    /**
     * A TempWorker with name n who types w words per minute and is
     * experienced with computers exactly when exp is true.
     */
    public TempWorker(String n, int w, boolean exp) {
        name = n;
        wordsPerMinute = w;
        isExperienced = exp;
    }
    
    /**
     * = "this TempWorker is equal to t: either they are both experienced
     * or they are both inexperienced and type the same number of words
     * per minute.
     */
    public boolean equals(TempWorker t) {
        return t != null
               && ((isExperienced && t.isExperienced)
                   || (!isExperienced && !t.isExperienced
                       && wordsPerMinute == t.wordsPerMinute));
    }
}
