/* This class is not correct. It needs to be fixed to work in a * sequential setting, and also a multithreaded setting. What must we * do to change it? */ public class RangeBuggy { private int lower; private int upper; public RangeBuggy(int lower, int upper) { this.lower = lower; this.upper = upper; } public boolean inRange(int v) { if (v >= lower && v <= upper) return true; return false; } public void incUpper() { upper ++; } public void incLower() { lower ++; } public void decLower() { lower-- ; } public void decUpper() { upper --; } }