Added methods to Work.java

Added the setResult method, which the threads will use to update the
workQueue