CSE647: Testing and Verification Homework 4 (ver. 2 Oct, 10:00) Due 9 Oct 2000 Scott Stoller 1. Everyone gave similar answers to hw2, problem 1, but I think none of them are completely correct. I believe you will learn more from thinking about it again than from reading an answer, so please try this problem again. Recall the problem: Consider changing notifyAll to notify in the code for remove(). Is this a good idea? Justify your answer. Big hint: Consider a queue with capacity 1. Construct a scenario in which a thread doing remove and a thread doing insert are simultaneously waiting, and they might end up waiting forever. 2. Your answer to hw2, problem 1, affects by your answer to hw2, problem 2, so here is a variant of that problem. Give modified code for Queue.java that performs no unnecessary notifications and does not allow threads to wait forever unnecessarily. Document your modifications either with comments in the code or with a separate explanation.