Alright this is what I did but it doesn't appear to work. Can anyone see any errors in the code?
public void removeFromQ() {
while(true) {
try {
Thread.sleep(30*1000);
if(listSize() == 0){
System.out.println("Nothing to Print");
}
else{
printdata temp = (printdata)getNode(0);
System.out.println("Printing " + temp.getPrint() + " for user " + temp.getUser());
if (temp.getUser()== 'A'){
ACount--;
}
if (temp.getUser()== 'B'){
BCount--;
}
if (temp.getUser()== 'C'){
CCount--;
}
removeNode(0);
}
// Use 3 second delay to prevent boredom.
// 30 seconds delay = 30*1000 millis
} catch(InterruptedException e) {
System.out.println("interrupt");
break;
}
}
}