become surprisingly complicated because the sequence of items may be either broken or contiguousas we've seen alsoa strange problem arises the front and rear pointers assume certain positions when the queue is fullbut they can assume these exact same positions when the queue is empty the queue can then appear to be full and empty at the same time this problem can be solved by making the array one cell larger than the maximum number of items that will be placed in it listing shows queue class that implements this no-count approach this class uses the no-count implementation listing the queue class without nitems class queue private int maxsizeprivate int[quearrayprivate int frontprivate int rear//public queue(int /constructor maxsize + /array is cell larger quearray new int[maxsize]/than requested front rear - //public void insert(int /put item at rear of queue if(rear =maxsize- rear - quearray[++rearj//public int remove(/take item from front of queue int temp quearray[front++]if(front =maxsizefront return temp//public int peek(/peek at front of queue return quearray[front]