Class Policeman

java.lang.Object
  |
  +--Policeman

public class Policeman
extends java.lang.Object

When a crime occurs, a Policeman instance is created. Note the constructor gives this "cop" a list of suspects. The cop then asks around while investigating, and if the fingerprint is recognized by one of the students, then the cop returns that suspect.


Constructor Summary
Policeman(java.util.LinkedList aList)
           
 
Method Summary
 Student investigateCrime(Fingerprint x)
          Oh, heck, there's a crime! and the fingerprint is x.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Policeman

public Policeman(java.util.LinkedList aList)
Method Detail

investigateCrime

public Student investigateCrime(Fingerprint x)
Oh, heck, there's a crime! and the fingerprint is x. So lets ask around. Check with 4 different Citizens. Ask each if they know anybody with the given fingerprint. If they do, then return that student as the prime suspect. Otherwise, ask until you have checked with 4 students.